DNS64 plugin: don't return SYNTH data, alter the response directly

Fixes #2619

However, cached responses now appear with the "PASS" status rather
than "CLOAK".
This commit is contained in:
Frank Denis 2024-04-19 18:19:16 +02:00
parent 0af88bc875
commit 6ae388e646

View file

@ -152,11 +152,10 @@ func (plugin *PluginDNS64) Eval(pluginsState *PluginsState, msg *dns.Msg) error
}
}
synth := EmptyResponseFromMessage(msg)
synth.Answer = append(synth.Answer, synth64...)
msg.Answer = synth64
msg.AuthenticatedData = false
msg.SetEdns0(uint16(MaxDNSUDPSafePacketSize), false)
pluginsState.synthResponse = synth
pluginsState.action = PluginsActionSynth
pluginsState.returnCode = PluginsReturnCodeCloak
return nil