diff options
Diffstat (limited to 'plugin/file/file.go')
-rw-r--r-- | plugin/file/file.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/plugin/file/file.go b/plugin/file/file.go index 2fe4b1644..bc582cfaa 100644 --- a/plugin/file/file.go +++ b/plugin/file/file.go @@ -129,12 +129,15 @@ func Parse(f io.Reader, origin, fileName string, serial int64) (*Zone, error) { return nil, err } - if !seenSOA && serial >= 0 { + if !seenSOA { if s, ok := rr.(*dns.SOA); ok { - if s.Serial == uint32(serial) { // same serial + seenSOA = true + + // -1 is valid serial is we failed to load the file on startup. + + if serial >= 0 && s.Serial == uint32(serial) { // same serial return nil, &serialErr{err: "no change in SOA serial", origin: origin, zone: fileName, serial: serial} } - seenSOA = true } } |