Bind Error

MikeDawg mikedawg at gmail.com
Tue Aug 1 17:29:00 UTC 2006


This is what I do:

Unpack the tarball, and open up (sourcetree)/lib/isc/unix/socket.c in
your favorite text editor.

Around line 1297 (may vary with different versions of bind):
#if defined(USE_CMSG) || defined(SO_BSDCOMPAT)
        int on = 1;

and change it to:
 #if defined(USE_CMSG)
        int on = 1;

essentially remove so_bsdcompat.

Next, around line 1384, find:

#ifdef SO_BSDCOMPAT
        if (setsockopt(sock->fd, SOL_SOCKET, SO_BSDCOMPAT,
                       (void *)&on, sizeof on) < 0) {
                isc__strerror(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 "setsockopt(%d, SO_BSDCOMPAT) %s: %s",
                                 sock->fd,
                                 isc_msgcat_get(isc_msgcat,
ISC_MSGSET_GENERAL,
                                                ISC_MSG_FAILED,
"failed"),
                                 strbuf);

                /* Press on... /*
        }
 #endif

and change it to (essentially comment out the whole thing, also note,
that gcc freaks out when you try to have a comment in a comment,
therefore that is why I removed the little bit of commenting that was
originally in the file:

/***  #ifdef SO_BSDCOMPAT
        if (setsockopt(sock->fd, SOL_SOCKET, SO_BSDCOMPAT,
                       (void *)&on, sizeof on) < 0) {
                isc__strerror(errno, strbuf, sizeof(strbuf));
                UNEXPECTED_ERROR(__FILE__, __LINE__,
                                 "setsockopt(%d, SO_BSDCOMPAT) %s: %s",
                                 sock->fd,
                                 isc_msgcat_get(isc_msgcat,
ISC_MSGSET_GENERAL,
                                                ISC_MSG_FAILED,
"failed"),
                                 strbuf);


        }
 #endif
***/


thuraye at gmail.com wrote:
> Dear All
>
>    I have facing with following problem in Fedora core 5
> how can i solve that?
> Pls help me
>
>
> `named' is using obsolete setsockopt SO_BSDCOMPAT
> 
> 
> 
> 
> 
> Thanks
> TRYm



More information about the bind-users mailing list