socket.c error in bind 9.9.0b2

Spain, Dr. Jeffry A. spainj at countryday.net
Tue Nov 22 16:17:33 UTC 2011


When bind 9.9.0b2 starts up, the syslog shows the following messages:

Nov 22 10:18:19 nstest2 named[17190]: using default UDP/IPv6 port range: [1024, 65535]
Nov 22 10:18:19 nstest2 named[17190]: listening on IPv6 interfaces, port 53
Nov 22 10:18:19 nstest2 named[17190]: socket.c:5728: unexpected error:
Nov 22 10:18:19 nstest2 named[17190]: setsockopt(513, IPV6_V6ONLY) failed: Invalid argument

The section of bind-9.9.0b2/lib/isc/unix/socket.c referenced in the error message is:
#ifdef IPV6_V6ONLY
        if (sock->pf == AF_INET6) {
                if (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_V6ONLY,
                               (void *)&onoff, sizeof(int)) < 0) {
                        char strbuf[ISC_STRERRORSIZE];
                        isc__strerror(errno, strbuf, sizeof(strbuf));
                        UNEXPECTED_ERROR(__FILE__, __LINE__,
                                         "setsockopt(%d, IPV6_V6ONLY) "
                                         "%s: %s", sock->fd,
                                         isc_msgcat_get(isc_msgcat,
                                                        ISC_MSGSET_GENERAL,
                                                        ISC_MSG_FAILED,
                                                        "failed"),
                                         strbuf);
                }
        }
        FIX_IPV6_RECVPKTINFO(sock);     /* AIX */
#endif

I have reproduced this on Ubuntu 11.04 (Natty) and 11.10 (Oneiric) amd64. The error does not occur with bind 9.8.1-P1. This same section of code appears in bind-9.8.0-P1/lib/isc/unix/socket.c and is identical to the above. My systems are operating in an IPv6/IPv4 dual-stack environment. The configuration file named.conf.options contains "listen-on-v6 { any; };". These systems seem to respond normally to IPv6 queries. Thanks for any advice you may have about how to troubleshoot further. Thanks.

Jeffry A. Spain
Network Administrator
Cincinnati Country Day School



More information about the bind-users mailing list