]> mj.ucw.cz Git - nsc-5.git/commitdiff
Added the FORWARDING macro.
authorMartin Mares <mj@ucw.cz>
Mon, 16 Jun 2008 19:04:47 +0000 (21:04 +0200)
committerMartin Mares <mj@ucw.cz>
Mon, 16 Jun 2008 19:04:47 +0000 (21:04 +0200)
NEWS
README
cf.dist/domains
m4/mkconf.m4

diff --git a/NEWS b/NEWS
index 5e3bf48f5cb5472d4e702587c1a656a1b93500be..7cb04612d90bcc3088d2c508705ab7cb0b5d5b9d 100644 (file)
--- 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 c43ebdea4ab5ec3136df8bae39547c3826f93181..628c7358bb52f9697f1be778b914c81d5e1330f4 100644 (file)
--- 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;
 ')
index f222df9d170868f7c51895d17d11492fe7863947..3933d4537c72150871cc3df4795a5033e0271b7c 100644 (file)
@@ -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)
index e5779217959d675eb42fbbc6e3d69522976e3206..0d2ab00784ef3148a82b87fa2215ee42b617c0b4 100644 (file)
@@ -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