in-view Zones are only recognized if defined in previous view in named.conf
Summary
BIND Version : 9.10.6-P1
This assumes that different views are defined, e.g. in this order restricted1, restricted2, default in named.conf. View default has match-clients set to any and therefore is the last in the list.
When defining a zone within a view to reference the zone definition in another view (using "in-view name-of-view") the zone in the other view is only recognized if the referenced view was defined earlier in the configuration file. Example for above views: view "restricted2" references a zone in view "restricted1" using "in-view restricted1"
When referencing zones in a view that is defined after the view that contains the reference those zones are not recognized and BIND logs /opt/named/current/conf/named.conf:NNN: zone 'name-of-zone' not defined in view 'name-of-view' Example for above views: view "restricted2" references a zone in view "default" using "in-view default"
Steps to reproduce
see configuration file below
What is the current bug behavior?
named does not recognize "forward" references for the views referenced by the in-view statement for a zone. named cannot be started due to a failure to load the configuration file.
What is the expected correct behavior?
It is expected that named does recognize "forward" references to allow to reference zones in the default (match-clients any) view.
Relevant configuration files
acl "restricted1" {
10.10.10.0/24;
};
acl "restricted2" {
172.16.10.0/24;
};
options {
directory "/opt/named/current/conf";
pid-file "/opt/named/current/etc/named.pid";
session-keyfile "/opt/named/current/conf/session.key";
};
view "restricted1" {
match-clients { restricted1; };
zone "restricted1.internal" {
type master;
file "db.restricted1.internal";
};
};
view "restricted2" {
match-clients { restricted2; };
zone "restricted2.internal" {
type master;
file "db.restricted2.internal";
};
// default view zones
zone "default.test" {
in-view default;
};
};
view "default" {
match-clients { any; };
zone "default.test" {
type master;
file "db.default.test";
};
};
Relevant logs and/or screenshots
Log Message:
May 24 14:52:55 XXXXX named[17257]: /opt/named/current/conf/named.conf:33: zone 'default.test' not defined in view 'default'