From: JINMEI Tatuya Date: Wed, 12 Oct 2011 02:37:26 +0000 (-0700) Subject: [1294] changed the default of zones/ixfr_disabled to true. also make sure X-Git-Tag: perftcpdns_before_epoll~37^2~16 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b9aefd1018b099666908d64650c8a5ea3e153ff4;p=thirdparty%2Fkea.git [1294] changed the default of zones/ixfr_disabled to true. also make sure the spec default is used when unspecified. --- diff --git a/doc/guide/bind10-guide.xml b/doc/guide/bind10-guide.xml index 34607e9105..08ed200adf 100644 --- a/doc/guide/bind10-guide.xml +++ b/doc/guide/bind10-guide.xml @@ -1278,13 +1278,19 @@ TODO that is, they don't work for an in-memory data source. - - To enable IXFR, you need to - configure b10-xfrin 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 bindctl prompt: +
+ Configuration for Incoming Zone Transfers + + 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)). + + + + 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 bindctl prompt: > config add Xfrin/zones > config set Xfrin/zones[0]/name "" @@ -1292,16 +1298,22 @@ TODO > config commit (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: + +
+
+ Enabling IXFR + + As noted above, b10-xfrin uses AXFR for + zone transfers by default. To enable IXFR for zone transfers + for a particular zone, set the ixfr_disabled + configuration parameter to true. + In the above example of configuration sequence, you'll need + to add the following before performing commit: > config set Xfrin/zones[0]/ixfr_disabled true - + - + 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. - + +
- - To manually trigger a zone transfer to retrieve a remote zone, - you may use the bindctl utility. - For example, at the bindctl prompt run: +
+ Trigger an Incoming Zone Transfer Manually + + + To manually trigger a zone transfer to retrieve a remote zone, + you may use the bindctl utility. + For example, at the bindctl prompt run: + + > Xfrin retransfer zone_name="" master= + +
- > Xfrin retransfer zone_name="" master= -
diff --git a/src/bin/xfrin/b10-xfrin.xml b/src/bin/xfrin/b10-xfrin.xml index 824d5fa006..454a82b40c 100644 --- a/src/bin/xfrin/b10-xfrin.xml +++ b/src/bin/xfrin/b10-xfrin.xml @@ -110,7 +110,7 @@ in separate zonemgr process. class (defaults to IN), master_addr (the zone master to transfer from), master_port (defaults to 53), - ixfr_disabled (defaults to false), and + ixfr_disabled (defaults to true), and tsig_key (optional TSIG key to use). The tsig_key is specified using a full string colon-delimited name:key:algorithm representation (e.g. diff --git a/src/bin/xfrin/xfrin.py.in b/src/bin/xfrin/xfrin.py.in index 28d5d50942..db6fab7b37 100755 --- a/src/bin/xfrin/xfrin.py.in +++ b/src/bin/xfrin/xfrin.py.in @@ -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,