if(d_haveednssubnet) {
EDNSSubnetOpts eso = d_eso;
- // use the scopeMask from the resolver, if it is greater - issue #5469
- maxScopeMask = max(maxScopeMask, eso.getScopePrefixLength());
+ if (!d_span.empty()) {
+ // if view handling set our span, we assume this is the best number
+ maxScopeMask = d_span.getBits();
+ }
+ else {
+ // use the scopeMask from the resolver, if it is greater - issue #5469
+ maxScopeMask = max(maxScopeMask, eso.getScopePrefixLength());
+ }
eso.setScopePrefixLength(maxScopeMask);
string opt = eso.makeOptString();
#!/bin/sh
-cleandig example.com TXT ednssubnet 192.0.2.0/32
-cleandig example.com TXT ednssubnet 192.0.2.200/32
+cleandig example.com TXT ednssubnet 192.0.2.0/32 2>&1
+cleandig example.com TXT ednssubnet 192.0.2.200/32 2>&1
-cleandig cname.example.com TXT ednssubnet 192.0.2.0/32
-cleandig cname.example.com TXT ednssubnet 192.0.2.200/32
+cleandig cname.example.com TXT ednssubnet 192.0.2.0/32 2>&1
+cleandig cname.example.com TXT ednssubnet 192.0.2.200/32 2>&1
-cleandig cname-nxd.example.com TXT ednssubnet 192.0.2.0/32
-cleandig cname-nxd.example.com TXT ednssubnet 192.0.2.200/32
+cleandig cname-nxd.example.com TXT ednssubnet 192.0.2.0/32 2>&1
+cleandig cname-nxd.example.com TXT ednssubnet 192.0.2.200/32 2>&1
+EDNS Subnet response: 192.0.2.0/32, scope: 192.0.2.0/25, family = 2
0 example.com. 3600 IN TXT "hello from the bar variant"
-2 . 0 IN OPT AAgACAABIADAAAIA
+2 . 0 IN OPT AAgACAABIBnAAAIA
Rcode: 0 (No Error), RD: 0, QR: 1, TC: 0, AA: 1, opcode: 0
Reply to question for qname='example.com.', qtype=TXT
+EDNS Subnet response: 192.0.2.200/32, scope: 192.0.2.0/24, family = 2
0 example.com. 3600 IN TXT "hello from the foo variant"
-2 . 0 IN OPT AAgACAABIADAAALI
+2 . 0 IN OPT AAgACAABIBjAAALI
Rcode: 0 (No Error), RD: 0, QR: 1, TC: 0, AA: 1, opcode: 0
Reply to question for qname='example.com.', qtype=TXT
+EDNS Subnet response: 192.0.2.0/32, scope: 192.0.2.0/25, family = 2
0 cname.example.com. 3600 IN CNAME target.example.org.
-2 . 0 IN OPT AAgACAABIADAAAIA
+2 . 0 IN OPT AAgACAABIBnAAAIA
Rcode: 0 (No Error), RD: 0, QR: 1, TC: 0, AA: 1, opcode: 0
Reply to question for qname='cname.example.com.', qtype=TXT
+EDNS Subnet response: 192.0.2.200/32, scope: 192.0.2.0/24, family = 2
0 cname.example.com. 3600 IN CNAME target.example.org.
0 target.example.org. 3600 IN TXT "hello from target..foo"
-2 . 0 IN OPT AAgACAABIADAAALI
+2 . 0 IN OPT AAgACAABIBjAAALI
Rcode: 0 (No Error), RD: 0, QR: 1, TC: 0, AA: 1, opcode: 0
Reply to question for qname='cname.example.com.', qtype=TXT
+EDNS Subnet response: 192.0.2.0/32, scope: 192.0.2.0/25, family = 2
0 cname-nxd.example.com. 3600 IN CNAME nxd.example.org.
-2 . 0 IN OPT AAgACAABIADAAAIA
+2 . 0 IN OPT AAgACAABIBnAAAIA
Rcode: 0 (No Error), RD: 0, QR: 1, TC: 0, AA: 1, opcode: 0
Reply to question for qname='cname-nxd.example.com.', qtype=TXT
+EDNS Subnet response: 192.0.2.200/32, scope: 192.0.2.0/24, family = 2
0 cname-nxd.example.com. 3600 IN CNAME nxd.example.org.
1 example.org. 3600 IN SOA a.misconfigured.dns.server.invalid. hostmaster.example.org. 0 10800 3600 604800 3600
-2 . 0 IN OPT AAgACAABIADAAALI
+2 . 0 IN OPT AAgACAABIBjAAALI
Rcode: 3 (Non-Existent domain), RD: 0, QR: 1, TC: 0, AA: 1, opcode: 0
Reply to question for qname='cname-nxd.example.com.', qtype=TXT