listen on specific IPv6 addresses

JINMEI Tatuya / 神明達哉 jinmei at
Tue Aug 6 17:25:59 UTC 2002

BIND9 only allows "none" and "any" for listen-on-v6, but I'm wondering
if it makes sense to allow more specific addresses (and prefixes) just
like listen-on for IPv4.

Basically there should be no reason to separate the configuration
policy between IPv4 and IPv6.  And, in fact, users may want to specify
particular addresses when they run multiple named servers listening on
different addresses on a single node (e.g. when migrating to a newer
version of the server).

After looking at the code of BIND 9.2.1, I have a feeling that this
can be done by modifying bin/named/interfacemgr.c, particularly the
do_ipv6() function in this file.  We may, however, have to care about
the case of "any", because in this case the current code only opens a
wildcard-binding socket with an IPv6-specific API
"IPV6_(RECV)PKTINFO".  We can reduce the number of sockets with this
approach for the most typical case, so we should keep this style.

Thus, I'd propose:

- when only "any" is specified for listen-on-v6 (which should be the
  typical case when enabling IPv6), open a single wildcard-binding
- when some specific addresses or prefixes are specified, open
  dedicated sockets binding the specified addresses.

I'd like to know others' opinion on this.  If this makes sense, I'll
make a patch for this extension and contribute it.


					JINMEI, Tatuya
					Communication Platform Lab.
					Corporate R&D Center, Toshiba Corp.
					jinmei at

More information about the bind-workers mailing list