AdvancedForwarding: Updated ProcessRequestAsync() to check if request has RD flag set before forwarding.

This commit is contained in:
Shreyas Zare
2023-03-11 15:12:34 +05:30
parent 6c3168f5d4
commit 2920c418d7

View File

@@ -164,7 +164,7 @@ namespace AdvancedForwarding
public Task<DnsDatagram> ProcessRequestAsync(DnsDatagram request, IPEndPoint remoteEP, DnsTransportProtocol protocol, bool isRecursionAllowed)
{
if (!_enableForwarding)
if (!_enableForwarding || !request.RecursionDesired)
return Task.FromResult<DnsDatagram>(null);
IPAddress remoteIP = remoteEP.Address;