From: Martin Mares Date: Mon, 16 Jun 2008 19:04:47 +0000 (+0200) Subject: Added the FORWARDING macro. X-Git-Tag: v5.1~29 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=5fdd42ff7477dba312833e956e45e375184c033a;p=nsc-5.git Added the FORWARDING macro. --- diff --git a/NEWS b/NEWS index 5e3bf48..7cb0461 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,6 @@ + + o Added the FORWARDING macro for generating forward-only zones. + Version 3.1 [21-05-2008] o Fixes for compatibility problems with recent versions of GNU m4. diff --git a/README b/README index c43ebde..628c735 100644 --- a/README +++ b/README @@ -136,6 +136,10 @@ REVERSE(network, primary-files...) You can also use the REV macro explicitly, which can be handy for example in SECONDARY declarations. +FORWARDED(zone, ip...) + Define a forwarding zone. All queries are forwarded to the + specified name servers. + ZONE_OPTIONS(`options; more options; ') diff --git a/cf.dist/domains b/cf.dist/domains index f222df9..3933d45 100644 --- a/cf.dist/domains +++ b/cf.dist/domains @@ -61,3 +61,7 @@ REVERSE(10.3.0.64/26, a.example.com) PRIMARY(ip6.example.com) REVERSE(fec0:1234::/32, ip6.example.com) + +; One more: a forward-only zone + +FORWARDING(fwd.example.com, 10.0.0.1, 10.0.0.2) diff --git a/m4/mkconf.m4 b/m4/mkconf.m4 index e577921..0d2ab00 100644 --- a/m4/mkconf.m4 +++ b/m4/mkconf.m4 @@ -40,6 +40,17 @@ define(`SLAVE', `FORWArd(only, $@)') divert(-1)') +# Definition of a forwarding zone + +define(`FORWARDING', `divert(0)zone "$1" in { + type forward; + forward only; + forwarders { FORWard(shift($@),)}; +ZZ_OPTIONS()dnl +}; + +divert(-1)') + # Manual insertion of config file material define(`CONFIG', `divert(0)$1