Forwarding plugin: force set the response ID to match the query ID

Shouldn't be necessary, but just to be safe in case `dns.Exchange()`
does something unexpected.
This commit is contained in:
Frank Denis 2020-02-05 02:52:54 +01:00
parent 63d28fc9b2
commit 824fa90f94
1 changed files with 1 additions and 0 deletions

View File

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