Fix zone parser error handling (#6680)

Signed-off-by: Nathan Currier <nathan.currier@broadcom.com>
This commit is contained in:
Nathan Currier
2024-07-01 10:27:50 -05:00
committed by GitHub
parent 2e9986c622
commit 626333a1b3
4 changed files with 37 additions and 13 deletions

View File

@@ -133,10 +133,6 @@ func resign(rd io.Reader, now time.Time) (why error) {
i := 0
for rr, ok := zp.Next(); ok; rr, ok = zp.Next() {
if err := zp.Err(); err != nil {
return err
}
switch x := rr.(type) {
case *dns.RRSIG:
if x.TypeCovered != dns.TypeSOA {
@@ -166,7 +162,7 @@ func resign(rd io.Reader, now time.Time) (why error) {
}
}
return nil
return zp.Err()
}
func signAndLog(s *Signer, why error) {