Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ldns-compare-zones skip rrsets with 2 resource record in comparison #108

Closed
edeleon-nic opened this issue Jul 28, 2020 · 3 comments
Closed

Comments

@edeleon-nic
Copy link

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:
00 Base-zone-info

  1. Base zone info at the left, modified zone at the right. dom917.com.mx and dom955.com.mx NS rrset with 2 rr's

01 Modified-zone-info
02. Base zone info at the left, modified zone at the right. dom917.com.mx with 3 rr's and dom955.com.mx NS rrset still with 2 rr´s

02 ldns-compare-usage
03. Usage of ldns-compare-zones, running version 1.7.1.. First comparison corresponds to image 01, and second to image 02.

@ghost
Copy link

ghost commented Aug 4, 2020

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

@ecaballerob
Copy link
Contributor

#109

wtoorop added a commit that referenced this issue Oct 6, 2021
@wtoorop
Copy link
Member

wtoorop commented Nov 26, 2021

Resolved in ldns-1.8.0

@wtoorop wtoorop closed this as completed Nov 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants