Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 48589 - BIND 9.2.x is using obsolete setsockopt SO_BSDCOMPAT in kernels 2.6.x
Summary: BIND 9.2.x is using obsolete setsockopt SO_BSDCOMPAT in kernels 2.6.x
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Stewart (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-21 12:15 UTC by Forza
Modified: 2004-10-31 07:07 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Forza 2004-04-21 12:15:47 UTC
It seem as BIND, or parts of the bind package is using functions (SO_BSDCOMPAT) that are marked as obsolete in the 2.6.x kernels.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.

Actual Results:  
A kernel warning. Might be severe with future kernels if this fenction is 
removed completely?
Comment 1 Forza 2004-04-21 13:25:18 UTC
This also applies to bind-tools-9.2.3-r1 (I have not tested with earler versions).
Comment 2 Stewart (RETIRED) gentoo-dev 2004-04-24 23:32:28 UTC
Have you consulted with the fine folks at ISC?

Try http://www.isc.org/sw/bind/ and find the link to the mailing lists, and/or contact information. Mark Andrews, Paul Vixie or many others will certainly be interested in your input.
Comment 3 Stewart (RETIRED) gentoo-dev 2004-04-24 23:36:27 UTC
(Used old resolution method. Changed to upstream issue.)
Comment 4 Stewart (RETIRED) gentoo-dev 2004-04-24 23:36:42 UTC
^^
Comment 5 Forza 2004-04-25 09:53:43 UTC
I have registered and submitted to their mailing list bind9-users@isc.org and am waiting for any response.

In their mailing list archive I found what would be some form of workaround though I did not find any of the referenses it needed in my system: http://marc.theaimsgroup.com/?l=bind9-users&m=107704346530456&w=2
Comment 6 Forza 2004-04-25 10:26:21 UTC
I got an aswer from the mailing list. I will post most of it here. Unfortunately I am only a user with not so much experience in patching/
making patches etc so I cannot provide any info about if this will work. :

~~~~~~~~~~~~~~~~~~~~

it turns out SO_BSDCOMPAT is an obsolete define in later kernels, and this
is an error generated from the bind process.

I will suggest better to  get the latest bind 9.2.3 code , fix the error,
and rebuild.

After unpacking, the code to change will be found in /lib/isc/unix/socket.c

First, locate this (around line 1297):


 #if defined(USE_CMSG) || defined(SO_BSDCOMPAT)
        int on = 1;
and change to this (i.e. remove the reference to SO_BSDCOMPAT)


 #if defined(USE_CMSG)
        int on = 1;
And then locate the subroutine (around line 1384):


 #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 comment out all of that routine completely:


 /* Nick #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
 End Nick */

Build, install... and the warnings stop.

~~~~~~~~~~~~~~~~~~~~
Comment 7 Toralf Förster gentoo-dev 2004-10-31 07:07:10 UTC
There should be a gentoo patch for bind-tools to prevent the syslog from being spamed by this nagging message, isn't it ?