Skip to content

Commit 915601f

Browse files
committed
Reponse plugins reject reponses without a question
1 parent b531fc6 commit 915601f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

dnscrypt-proxy/plugins.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,9 @@ func (pluginsState *PluginsState) ApplyResponsePlugins(
342342
if err := msg.Unpack(); err != nil {
343343
return packet, err
344344
}
345+
if len(msg.Question) != 1 {
346+
return packet, errors.New("Unexpected number of questions in response")
347+
}
345348
switch Rcode(packet) {
346349
case dns.RcodeSuccess:
347350
pluginsState.returnCode = PluginsReturnCodePass

0 commit comments

Comments
 (0)