Truncated packets cannot be parsed by miekg/dns; clear the error flag when it happens
Fixes #177
This commit is contained in:
parent
aea15a484e
commit
636f92bae0
|
@ -155,6 +155,9 @@ func (pluginsState *PluginsState) ApplyResponsePlugins(pluginsGlobals *PluginsGl
|
||||||
pluginsState.action = PluginsActionForward
|
pluginsState.action = PluginsActionForward
|
||||||
msg := dns.Msg{}
|
msg := dns.Msg{}
|
||||||
if err := msg.Unpack(packet); err != nil {
|
if err := msg.Unpack(packet); err != nil {
|
||||||
|
if len(packet) >= MinDNSPacketSize && HasTCFlag(packet) {
|
||||||
|
err = nil
|
||||||
|
}
|
||||||
return packet, err
|
return packet, err
|
||||||
}
|
}
|
||||||
pluginsGlobals.RLock()
|
pluginsGlobals.RLock()
|
||||||
|
|
Loading…
Reference in New Issue