Listening on IPv6 address fails if IPv6 addresses are tentative
It seems that knotd suffers from the same issue as described here: http://lists.scusting.com/index.php?t=msg&th=244420
I have Debian 7.0 with http://deb.knot-dns.cz/debian/dists/wheezy/main/binary-i386/net/knot_1.2.0-1~bpo70+1_i386.deb installed and this is in /var/log/syslog after reboot:
Jun 3 22:37:43 ns knot[2091]: Binding to interface 2xxx:xxxx:xxxx:xxxx::1 port 53. Jun 3 22:37:43 ns knot[2091]: [error] Cannot bind to socket (errno 99). Jun 3 22:37:43 ns knot[2091]: [error] Could not bind to UDP interface 2xxx:xxxx:xxxx:xxxx::1 port 53.
I have a static IPv6 address configured in /etc/network/interfaces. Restarting knot later binds to this IPv6 address without any problem - it is only the first start which fails (during OS booting). What do you think that is the proper way of making knotd reliably listen on a static IPv6 address? I would prefer if I could avoid restarting knotd.
I don't really like replying to myself, but just in case anybody is interested - the following hack makes it work for me:
echo "while ip -6 addr | grep -q tentative; do sleep 1; done" >> /etc/default/knotd
Maybe that it would be better if knotd could do this internally.
I had to take a different approach: in /etc/network/interfaces I have added "pre-up sysctl net.ipv6.conf.eth0.dad_transmits=0" after "iface eth0 inet6 static" and it seems to work fine so far.
Possible solution might be outlined in: http://lists.scusting.com/index.php?t=msg&th=244420&goto=1042086&#msg_1042086