• Miek Gieben's avatar
    reverse zones (#4538) · e42614ed
    Miek Gieben authored
    * core: fix v4 non-octet reverse zones
    
    This fixes the reverse zones handling. Add expanstion of the reverse
    notation to all octet boundary subnets and add those to the config - just as if
    they were directly typed in the config.
    
    This takes inspiration from #4501, but that (even with DCO!!) seems to
    be just using https://github.com/apparentlymart/go-cidr/ so use that
    instead - I think a minor function is still needed that one is copied
    from #4501.
    
    Also sort the zones we are listing on startup - caught in this PR
    because of the expanded zones being not listed next to each other.
    
    This also removes the need for FilterFunc from the config, so this is
    now gone as well, making the whole thing slightly more efficient.
    
    Add couple of reverse unit tests and a e2e test that queries for the
    correct (and incorrect) reverse zones and checks the reply.
    
    Closes: #4501
    Fixes: #2779
    Signed-off-by: default avatarMiek Gieben <miek@miek.nl>
    
    * Add more test cases
    
    Add test from origin bug report: #2779
    Signed-off-by: default avatarMiek Gieben <miek@miek.nl>
    
    * Rebase and fix conflicts
    Signed-off-by: default avatarMiek Gieben <miek@miek.nl>
    e42614ed
reverse_test.go 800 Bytes