]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[1294] changed the default of zones/ixfr_disabled to true. also make sure
authorJINMEI Tatuya <jinmei@isc.org>
Wed, 12 Oct 2011 02:37:26 +0000 (19:37 -0700)
committerJINMEI Tatuya <jinmei@isc.org>
Wed, 12 Oct 2011 02:37:26 +0000 (19:37 -0700)
the spec default is used when unspecified.

doc/guide/bind10-guide.xml
src/bin/xfrin/b10-xfrin.xml
src/bin/xfrin/xfrin.py.in

index 34607e91055c56b60ebddd97a395cb4485505fdf..08ed200adfde3ce1a41dfc868ac7010a8ebc1289 100644 (file)
@@ -1278,13 +1278,19 @@ TODO
      that is, they don't work for an in-memory data source.
     </simpara></note>
 
-    <para>
-      To enable IXFR, you need to
-      configure <command>b10-xfrin</command> with an explicit zone
-      configuration for the zone.
-      For example, to enable IXFR for a zone named "example.com"
-      (whose master address is assumed to be 2001:db8::53 here),
-      run the following at the <command>bindctl</command> prompt:
+    <section>
+      <title>Configuration for Incoming Zone Transfers</title>
+      <para>
+       In practice, you need to specify a list of secondary zones to
+       enable incoming zone transfers for these zones (you can still
+       trigger a zone transfer manually, without a prior configuration
+       (see below)).
+      </para>
+
+      <para>
+       For example, to enable zone transfers for a zone named "example.com"
+       (whose master address is assumed to be 2001:db8::53 here),
+       run the following at the <command>bindctl</command> prompt:
 
       <screen>&gt; <userinput>config add Xfrin/zones</userinput>
 &gt; <userinput>config set Xfrin/zones[0]/name "<option>example.com</option>"</userinput>
@@ -1292,16 +1298,22 @@ TODO
 &gt; <userinput>config commit</userinput></screen>
 
       (We assume there has been no zone configuration before).
-      Note that you do NOT have to explicitly enable IXFR in the zone
-      configuration; once it's defined, IXFR is enabled by default.
-      This also means if you specify a zone configuration for some
-      other reason but don't want to use IXFR for that zone, you need
-      to disable it explicitly:
+      </para>
+    </section>
 
+    <section>
+      <title>Enabling IXFR</title>
+      <para>
+       As noted above, <command>b10-xfrin</command> uses AXFR for
+       zone transfers by default.  To enable IXFR for zone transfers
+       for a particular zone, set the <userinput>ixfr_disabled</userinput>
+       configuration parameter to <userinput>true</userinput>.
+       In the above example of configuration sequence, you'll need
+       to add the following before performing <userinput>commit</userinput>:
       <screen>&gt; <userinput>config set Xfrin/zones[0]/ixfr_disabled true</userinput></screen>
-    </para>
+      </para>
 
-    <para>
+      <note><simpara>
       One reason why IXFR is disabled by default in the current
       release is because it does not support automatic fallback from IXFR to
       AXFR when it encounters a primary server that doesn't support
@@ -1315,7 +1327,8 @@ TODO
       make this selection automatically.
       These features will be implemented in a near future
       version, at which point we will enable IXFR by default.
-    </para>
+      </simpara></note>
+    </section>
 
 <!-- TODO:
 
@@ -1328,13 +1341,18 @@ what if a NOTIFY is sent?
 
 -->
 
-    <para>
-       To manually trigger a zone transfer to retrieve a remote zone,
-       you may use the <command>bindctl</command> utility.
-       For example, at the <command>bindctl</command> prompt run:
+    <section>
+      <title>Trigger an Incoming Zone Transfer Manually</title>
+
+      <para>
+       To manually trigger a zone transfer to retrieve a remote zone,
+       you may use the <command>bindctl</command> utility.
+       For example, at the <command>bindctl</command> prompt run:
+
+       <screen>&gt; <userinput>Xfrin retransfer zone_name="<option>foo.example.org</option>" master=<option>192.0.2.99</option></userinput></screen>
+      </para>
+    </section>
 
-       <screen>&gt; <userinput>Xfrin retransfer zone_name="<option>foo.example.org</option>" master=<option>192.0.2.99</option></userinput></screen>
-    </para>
 
 <!-- TODO: can that retransfer be used to identify a new zone? -->
 <!-- TODO: what if doesn't exist at that master IP? -->
index 824d5fa006f37ae769e2737a5eded93dc9e6d951..454a82b40c94f757d47536de834ba5900deb935c 100644 (file)
@@ -110,7 +110,7 @@ in separate zonemgr process.
       <varname>class</varname> (defaults to <quote>IN</quote>),
       <varname>master_addr</varname> (the zone master to transfer from),
       <varname>master_port</varname> (defaults to 53),
-      <varname>ixfr_disabled</varname> (defaults to false), and
+      <varname>ixfr_disabled</varname> (defaults to true), and
       <varname>tsig_key</varname> (optional TSIG key to use).
       The <varname>tsig_key</varname> is specified using a full string
       colon-delimited name:key:algorithm representation (e.g.
index 28d5d50942838449906f2f6b913d6e5a792a7352..db6fab7b37276eec0a72341d82cea8698c15a494 100755 (executable)
@@ -876,7 +876,12 @@ class ZoneInfo:
         self.set_master_port(config_data.get('master_port'))
         self.set_zone_class(config_data.get('class'))
         self.set_tsig_key(config_data.get('tsig_key'))
-        self.set_ixfr_disabled(config_data.get('ixfr_disabled'))
+        # XXX: harecode the default for ixfr_disabled.  We should retrieve
+        # it from the 
+        ixfr_disabled = config_data.get('ixfr_disabled')
+        if ixfr_disabled is None:
+            ixfr_disabled = True
+        self.set_ixfr_disabled(ixfr_disabled)
 
     def set_name(self, name_str):
         """Set the name for this zone given a name string.
@@ -952,14 +957,14 @@ class ZoneInfo:
                 raise XfrinZoneInfoException(errmsg)
 
     def set_ixfr_disabled(self, ixfr_disabled):
-        """Set ixfr_disabled. If set to False (the default), it will use
+        """Set ixfr_disabled. If set to False, it will use
            IXFR for incoming transfers. If set to True, it will use AXFR.
            At this moment there is no automatic fallback"""
-        # don't care what type it is; if evaluates to true, set to True
-        if ixfr_disabled:
-            self.ixfr_disabled = True
+        if ixfr_disabled is None:
+            self.ixfr_disabled = \
+                self._module_cc.get_default_value("zones/ixfr_disabled")
         else:
-            self.ixfr_disabled = False
+            self.ixfr_disabled = ixfr_disabled
 
     def get_master_addr_info(self):
         return (self.master_addr.family, socket.SOCK_STREAM,