On Mon, Nov 10, 2008 at 07:51:14AM -0700, The Doctor wrote:
> REporting problem in bind-9.4.3rc1
>
> Nov 10 07:47:31 gallifrey named[2940]: starting BIND 9.4.3rc1
> Nov 10 07:47:31 gallifrey named[2940]: found 1 CPU, using 1 worker thread
> Nov 10 07:47:31 gallifrey named[2940]: using up to 1024 sockets
> Nov 10 07:47:31 gallifrey named[2940]: loading configuration from '/etc/named.conf'
> Nov 10 07:47:31 gallifrey named[2940]: using default UDP/IPv4 port range: [1024,
> 65535]
> Nov 10 07:47:31 gallifrey named[2940]: using default UDP/IPv6 port range: [1024,
> 65535]
> Nov 10 07:47:31 gallifrey named[2940]: listening on IPv4 interface exp0, 204.209.81.3#53
> Nov 10 07:47:31 gallifrey named[2940]: socket.c:779: unexpected error:
> Nov 10 07:47:31 gallifrey named[2940]: fcntl(512, F_SETFL, -1): Bad file descriptor
> Nov 10 07:47:31 gallifrey named[2940]: could not listen on UDP socket: unexpected error
> Nov 10 07:47:31 gallifrey named[2940]: creating IPv4 interface exp0 failed; interface ignored
> Nov 10 07:47:31 gallifrey named[2940]: listening on IPv4 interface lo0, 127.0.0.1#53
>
> Why?
>



FYI here is the code in question:

/*
* Make a fd non-blocking.
*/
static isc_result_t
make_nonblock(int fd) {
int ret;
int flags;
char strbuf[ISC_STRERRORSIZE];
#ifdef USE_FIONBIO_IOCTL
int on = 1;

ret = ioctl(fd, FIONBIO, (char *)&on);
#else
flags = fcntl(fd, F_GETFL, 0);
flags |= PORT_NONBLOCK;
ret = fcntl(fd, F_SETFL, flags);
#endif

if (ret == -1) {
isc__strerror(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
#ifdef USE_FIONBIO_IOCTL
"ioctl(%d, FIONBIO, &on): %s", fd,
#else
"fcntl(%d, F_SETFL, %d): %s", fd, flags,
#endif
strbuf);

return (ISC_R_UNEXPECTED);
}

return (ISC_R_SUCCESS);
}
--
Member - Liberal International
This is doctor@nl2k.ab.ca Ici doctor@nl2k.ab.ca
God, Queen and country! Beware Anti-Christ rising!
Lest we forget 11/11/2008.

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.