configuration of zone options in DLZ

tridge at tridge at
Wed Dec 15 21:56:44 UTC 2010

Hi Evan,

One thing I haven't done yet with the DLZ patches that I think would
be worthwhile would be to provide a hook for a DLZ driver to set zone
configuration options.

Right now you define an external dlz zone like this:

dlz "example zone" {
	database " OPTIONS";

This doesn't give any opportunity to set any of the zone specific
options that bind9 has. Many of these options don't matter, as they
control aspects of bind that are in the parts of the code bypassed
when you use a DLZ driver, but I suspect there are a few options that
some sites will want to control.

I think that to keep with the DLZ style, the configuration of zone
specific options should be done by the DLZ driver, not in
named.conf. So I think we should have a dlz helper function, something

  isc_result_t dns_dlz_set_option(dns_dlzdb_t *dlzdatabase, 
				  const char *zone, 
				  const char *config_option);

which the driver could call during the configuration phase (much like
dns_dlz_writeable_zone() is called during zone configuration).

This config_option argument would be in the same format for config
options in normal named.conf zone sections. The bind9 dlz core would
then fire up the zoneconf parser on these config snippets, and set any
zone specific config options on the zone. This would only apply to
writeable DLZ zones, as otherwise you don't have a dns_zone_t to apply
the options to.

I haven't implemented this yet for two reasons. First off I haven't
discovered any non-default zone options that I need for the Samba DLZ
driver, so I don't need to override any zone config options
yet. Secondly I looked at the zoneconf code, and thought it would be
quite hairy setting up a parser for a config snippet, so I decided to
leave it until I really had a need.

Do you think there are config options which will be essential for DLZ
drivers to be able to set? If so, does the above approach sound
reasonable? Or maybe leave it for a later release?

Cheers, Tridge

More information about the bind-workers mailing list