-(dnsforward): fix handling RRSIG records

This commit is contained in:
Andrey Meshkov 2020-05-14 18:08:47 +03:00
parent ae51de9335
commit 5d7b3fb7d5
1 changed files with 29 additions and 27 deletions

View File

@ -165,8 +165,9 @@ func processDNSSECAfterResponse(ctx *dnsContext) int {
return resultDone return resultDone
} }
if !ctx.origReqDNSSEC {
optResp := d.Res.IsEdns0() optResp := d.Res.IsEdns0()
if !ctx.origReqDNSSEC && optResp != nil && optResp.Do() { if optResp != nil && !optResp.Do() {
return resultDone return resultDone
} }
@ -196,6 +197,7 @@ func processDNSSECAfterResponse(ctx *dnsContext) int {
} }
} }
d.Res.Ns = answers d.Res.Ns = answers
}
return resultDone return resultDone
} }