struct local_zone* z = NULL;
rpz_log_dname("delegation point", dp->name, dp->namelen);
- // XXX: do we want this?
- z = rpz_find_zone(zones, dp->name, dp->namelen, qclass, 0, 0, 0);
- if(z != NULL) {
- match->dname = dp->name;
- match->dname_len = dp->namelen;
- } else if(z == NULL) {
- for(nameserver = dp->nslist;
- nameserver != NULL;
- nameserver = nameserver->next) {
- rpz_log_dname("delegation point", nameserver->name, nameserver->namelen);
- z = rpz_find_zone(zones, nameserver->name, nameserver->namelen,
- qclass, 0, 0, 0);
- if(z != NULL) {
- match->dname = nameserver->name;
- match->dname_len = nameserver->namelen;
- break;
- }
+ /* the rpz specs match the nameserver names (NS records), not the
+ * name of the delegation point itself, to the nsdname triggers */
+ for(nameserver = dp->nslist;
+ nameserver != NULL;
+ nameserver = nameserver->next) {
+ rpz_log_dname("delegation point ns", nameserver->name, nameserver->namelen);
+ z = rpz_find_zone(zones, nameserver->name, nameserver->namelen,
+ qclass, 0, 0, 0);
+ if(z != NULL) {
+ match->dname = nameserver->name;
+ match->dname_len = nameserver->namelen;
+ break;
}
}
3600 IN NS ns1.rpz.example.com.
3600 IN NS ns2.rpz.example.com.
$ORIGIN rpz.example.com.
-gotham.aa.rpz-nsdname CNAME .
-gotham.bb.rpz-nsdname CNAME *.
-gotham.cc.rpz-nsdname CNAME rpz-drop.
-gotham.com.rpz-nsdname CNAME rpz-passthru.
-gotham.dd.rpz-nsdname CNAME rpz-tcp-only.
-gotham.ff.rpz-nsdname A 127.0.0.1
-gotham.ff.rpz-nsdname TXT "42"
+ns1.gotham.aa.rpz-nsdname CNAME .
+ns1.gotham.bb.rpz-nsdname CNAME *.
+ns1.gotham.cc.rpz-nsdname CNAME rpz-drop.
+ns1.gotham.com.rpz-nsdname CNAME rpz-passthru.
+ns1.gotham.dd.rpz-nsdname CNAME rpz-tcp-only.
+ns1.gotham.ff.rpz-nsdname A 127.0.0.1
+ns1.gotham.ff.rpz-nsdname TXT "42"
TEMPFILE_END
stub-zone: