mirror of
https://github.com/fergalmoran/DnsServer.git
synced 2025-12-29 21:07:44 +00:00
DnsRebindBlocking: Exclude authoritative responses.
This commit is contained in:
@@ -46,7 +46,8 @@ namespace DnsRebindBlocking
|
||||
|
||||
public Task<DnsDatagram> PostProcessAsync(DnsDatagram request, IPEndPoint remoteEP, DnsTransportProtocol protocol, DnsDatagram response)
|
||||
{
|
||||
if (!Config.Enabled)
|
||||
// Do not filter authoritative responses. Because in this case any rebinding is intentional.
|
||||
if (!Config.Enabled || response.AuthoritativeAnswer)
|
||||
return Task.FromResult(response);
|
||||
|
||||
var answers = response.Answer.Where(res => !IsFilteredRebind(res)).ToList();
|
||||
|
||||
Reference in New Issue
Block a user