CC: | Pavel Simerda <psimerda@redhat.com> |
Subject: | The way of binding to listen-on addresses |
Date: | Fri, 18 Jul 2014 11:02:42 -0400 (EDT) |
To: | bind-suggest@isc.org |
From: | Tomas Hozza <thozza@redhat.com> |
Hi.
Recently we had some issues with starting services (also named)
in Fedora due to Systemd changes. This brought huge discussion about
whether some services could use IP_FREEBIND socket option to be
able to bind to the address, before it is configured on the interface.
I looked into named sources and realized that it looks for existing
interface with the specified address and if there is none it does
not even try to bind to it.
Did you ever considered using IP_FREEBIND socket option when binding
named to a specific address(es) and changing the logic?
It should be possible, but looking at the code it's far from trivial.
Second think I would like to discuss is the named behavior when it is
configured to listen on 'any' address. It binds to all specific addresses
available on the system when starting up. If some interface goes up,
one have to restart named.
Did you considered adding support for netlink to be able to dynamically
bind to new addresses?
In Fedora we already have come "complains" [1] about why named does not
bind to 0.0.0.0 when configured to listen-on 'any' address. Adam Tkac
commented that he recalls the reason is that there is no portable way
for IPv4 to find out to which address was the incoming packet addressed.
Is this really the reason, or are there any other?
Did you considered using the 0.0.0.0 address when listening on 'any'
address (even to use some non-portable way on systems supporting it)?
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1073038
Thank you in advance.
Regards,
--
Tomas Hozza
Software Engineer - EMEA ENG Developer Experience
PGP: 1D9F3C2D
Red Hat Inc. http://cz.redhat.com