diff options
author | des <des@FreeBSD.org> | 2014-07-18 11:32:44 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2014-07-18 11:32:44 +0000 |
commit | d96c67cabdd8553d6547ab549c8a31d73216ca58 (patch) | |
tree | be4bfe814455ceb6ca5c8d81a2b77a7723bacde0 /contrib/unbound/services | |
parent | 4691d48742e02c973343f0e0b07fa08d0ae9a5a8 (diff) | |
download | FreeBSD-src-d96c67cabdd8553d6547ab549c8a31d73216ca58.zip FreeBSD-src-d96c67cabdd8553d6547ab549c8a31d73216ca58.tar.gz |
Import unblock-lan-zones feature backported from upstream svn trunk.
This is a partial fix for reverse lookups in RFC 1918 networks. With
this option enabled, unbound no longer ignores these queries; however,
it will still reject the answer it gets from the forwarder, because
the RFC 1918 reverse zones are signed.
Submitted by: "W.C.A. Wijngaards" <wouter@nlnetlabs.nl>
Diffstat (limited to 'contrib/unbound/services')
-rw-r--r-- | contrib/unbound/services/localzone.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/unbound/services/localzone.c b/contrib/unbound/services/localzone.c index ac889799..a1688e1 100644 --- a/contrib/unbound/services/localzone.c +++ b/contrib/unbound/services/localzone.c @@ -594,6 +594,8 @@ lz_enter_defaults(struct local_zones* zones, struct config_file* cfg) /* this list of zones is from RFC 6303 */ + /* block localhost level zones, first, later the LAN zones */ + /* localhost. zone */ if(!lz_exists(zones, "localhost.") && !lz_nodefault(cfg, "localhost.")) { @@ -650,6 +652,14 @@ lz_enter_defaults(struct local_zones* zones, struct config_file* cfg) } lock_rw_unlock(&z->lock); } + + /* if unblock lan-zones, then do not add the zones below. + * we do add the zones above, about 127.0.0.1, because localhost is + * not on the lan. */ + if(cfg->unblock_lan_zones) + return 1; + + /* block LAN level zones */ if ( !add_as112_default(zones, cfg, "10.in-addr.arpa.") || !add_as112_default(zones, cfg, "16.172.in-addr.arpa.") || !add_as112_default(zones, cfg, "17.172.in-addr.arpa.") || |