Skip to content

iterate: fix bad zone_cut update in a rare case

Vladimír Čunát requested to merge fix-aws-console into master

https://forum.turris.cz/t/kresd-name-unresolution/16275

Example problematic query during QNAME minimization:

[resolv][43578.24]   => id: '08532' querying: 'ns-921.amazon.com.'@'34.196.62.143#00053' zone cut: 'aws.amazon.com.' qname: 'coNsOlE.aWs.AmAzON.Com.' qtype: 'NS' proto: 'udp'
[iterat][43578.24]   <= answer received:
;; ->>HEADER<<- opcode: QUERY; status: NXDOMAIN; id: 8532
;; Flags: qr aa  QUERY: 1; ANSWER: 4; AUTHORITY: 1; ADDITIONAL: 0

;; QUESTION SECTION
console.aws.amazon.com.         NS

;; ANSWER SECTION
console.aws.amazon.com. 600     NS      ns-921.amazon.com.
console.aws.amazon.com. 60      CNAME   us-east-1.console.aws.amazon.com.
us-east-1.console.aws.amazon.com. 600   NS      ns-921.amazon.com.
us-east-1.console.aws.amazon.com. 60    CNAME   gr.console-geo.us-east-1.amazonaws.com.

;; AUTHORITY SECTION
us-east-1.amazonaws.com.        60      SOA     ns-921.amazon.com. root.amazon.com. 1638962488 3600 900 7776000 60

[iterat][43578.24]   <= rcode: NXDOMAIN

Here the zone_cut would get updated to us-east-1.console.aws.amazon.com. breaking further resolution towards eu-west-3.console.aws.amazon.com.

Merge request reports