Closed edeleon-nic closed 2 years ago
Think this is also tripping me up when comparing an A record rrset - it's not picking up the difference when one side has 2 records, and the 1st record matches okay the subsequent differences aren't picked up.
server 1:
❯ dig axfr ldns.test @192.168.1.241 |grep "host.ldns.test" host.ldns.test. 3600 IN A 1.1.1.1 host.ldns.test. 3600 IN A 2.2.2.2
server2:
❯ dig axfr ldns.test @192.168.1.212 |grep "host.ldns.test" host.ldns.test. 28800 IN A 1.1.1.1 host.ldns.test. 28800 IN A 3.3.3.3
result:
$ ldns-compare-zones -a src/db.ldns.test tgt/db.ldns.test ~-ldns.test. 3600 IN NS dc01.example.com. ~+ldns.test. 28800 IN NS ns01.example.net. +0 -0 ~1
-> no difference in A records picked up
Change it so that the "1st" A record is different, and then the differences are picked up:
server 1:
❯ dig axfr ldns.test @192.168.1.241 |grep "host.ldns.test" host.ldns.test. 3600 IN A 1.1.1.1 host.ldns.test. 3600 IN A 2.2.2.2
server2:
❯ dig axfr ldns.test @192.168.1.212 |grep "host.ldns.test" host.ldns.test. 28800 IN A 3.3.3.3 host.ldns.test. 28800 IN A 4.4.4.4
result:
$ ldns-compare-zones -a src/db.ldns.test tgt/db.ldns.test ~-ldns.test. 3600 IN NS dc01.example.com. ~+ldns.test. 28800 IN NS ns01.example.net. ~-host.ldns.test. 3600 IN A 1.1.1.1 ~-host.ldns.test. 3600 IN A 2.2.2.2 ~+host.ldns.test. 28800 IN A 3.3.3.3 ~+host.ldns.test. 28800 IN A 4.4.4.4 +0 -0 ~2
Resolved in ldns-1.8.0
Hi everyone,
We're currently using
ldns-compare-zones
to test the correlation between changes in zone files provided by two different process. The base cases are working as intended (new rrset deleting rrset, change in SOA and so on). But when a rrset is modified (Add/Rem of resource record) and the size of the resulting rrset is 2 resource records, the differences are not taken into account. Once the rrset is different than this size (1rr, or greater than 2) the changes are printed. This behavior was identified on NS rrset.We´re testing different scenarios and working on a fix and we would be glad to propose it to you, this issue is for follow up purpose.
Any feedback on this issue or in the reported data and structure would be appreciated.
Images of the test cases:
ldns-compare-zones
, running version1.7.1.
. First comparison corresponds to image 01, and second to image 02.