• Miek Gieben's avatar
    plugin/file: New zone should have zero records (#3025) · 01e13c62
    Miek Gieben authored
    After calling NewZone the number of records should be zero, but due to
    how zone.All() was implemented so empty RRs would be added. This then
    fails the == 0 check in xfr.go and put nil in the slice, this then
    subsequently panics on the Len().
    
    Fix this making All() smarter when adding records. Added little test to
    enfore this.
    Signed-off-by: default avatarMiek Gieben <miek@miek.nl>
    01e13c62
zone.go 4.9 KB