Verify that ApplyQueryPlugins() doesn't blow the packet size

This commit is contained in:
Frank Denis 2019-06-03 00:47:39 +02:00
parent 11311d663d
commit 5b5b5ec583
1 changed files with 3 additions and 0 deletions

View File

@ -333,6 +333,9 @@ func (proxy *Proxy) processIncomingQuery(serverInfo *ServerInfo, clientProto str
}
pluginsState := NewPluginsState(proxy, clientProto, clientAddr, start)
query, _ = pluginsState.ApplyQueryPlugins(&proxy.pluginsGlobals, query)
if len(query) < MinDNSPacketSize || len(query) > MaxDNSPacketSize {
return
}
var response []byte
var err error
if pluginsState.action != PluginsActionForward {