Force clear the AD bit unless the DO bit was also set

This commit is contained in:
Frank Denis 2019-12-11 09:41:16 +01:00
parent ee1c0fed93
commit 1674bb1742
2 changed files with 4 additions and 0 deletions

View File

@ -17,6 +17,7 @@ func EmptyResponseFromMessage(srcMsg *dns.Msg) *dns.Msg {
}
dstMsg.RecursionDesired = false
dstMsg.CheckingDisabled = false
dstMsg.AuthenticatedData = false
dstMsg.Answer = make([]dns.RR, 0)
dstMsg.Ns = make([]dns.RR, 0)
dstMsg.Extra = make([]dns.RR, 0)

View File

@ -97,6 +97,9 @@ func (plugin *PluginForward) Eval(pluginsState *PluginsState, msg *dns.Msg) erro
if err != nil {
return err
}
if edns0 := respMsg.IsEdns0(); edns0 == nil || !edns0.Do() {
respMsg.AuthenticatedData = false
}
pluginsState.synthResponse = respMsg
pluginsState.action = PluginsActionSynth
return nil