SO_BSDCOMPAT MESSAGE
Danny Mayer
mayer at gis.net
Fri Nov 18 02:07:54 UTC 2005
Mark Andrews wrote:
>>Hi Everybody ,
>>
>> I installed bind 9.3.1 on fedora core 3 and When I start named
>>it's giving an message like this " dns2 kernel: process `named' is using
>>obsolete setsockopt SO_BSDCOMPAT " I check mailing list and history but I
>>couldn't find any information for solve it , also on google. Do you have any
>>idea why this message anonced by kernel ? one time named are stopped , any
>>relation with this message ?
>>
>>Thanks
>>Best Regards
>>
>>Vahric MUHTARYAN
>>Sistem Mühendisi/System Engineer
>>DorukNet
>>Tel / Phone : +90 212 326 92 00
>>Fax : +90 212 227 28 11
>>E-mail : vahric.muhtaryan at doruk.net.tr
>>http://www.doruk.net.tr
>>http://www.doruk.net.tr/english.html
>
>
> Complain to the Linux kernel developers. They should remove
> the message or the #define.
>
> I suspect that all usage instances are actually protected
> with a #ifdef SO_BSDCOMPAT because it is not in early versions
> of the kernel.
>
> e.g.
>
> #ifdef SO_BSDCOMPAT
> if (type != isc_sockettype_unix &&
> 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
>
> Do they really expect application developers to try to
> workout what kernel version is running to see if they need
> to set SO_BSDCOMPAT especially when some kernel versions
> need the option turned on?
>
> As to why it was that the Linux kernel developers thought
> that making unconnected UDP sockets return errors after
> getting a ICMP message would be good. Unfortunately this
> is only really useful in the case where a connected UDP
> socket could be used (always talking to the same end point).
> There is not enough information to do anything with the
> error code when you are talking to thousands of different
> clients a second.
>
They probably decided to follow Microsoft's example in Windows 2000 and
when they put out a fix for it, instead of fixing the code, the provided
a WSAIoctl() option for programmers to fix themselves Microsoft's broken
code. See Q263823 for the harrowing details.
Danny
> They then came up with this socket option to restore the
> BSD Socket API behaviour (SO_BSDCOMPAT) and not pass the
> error information back up the stack.
>
> They then decided to change the default to be the BSD Socket
> API behaviour so the setsockopt(SO_BSDCOMPAT) call was no
> longer necessary and decided to make the kernel complain
> about all such calls but also did not remove the #define for
> SO_BSDCOMPAT.
>
> Mark
> --
> Mark Andrews, ISC
> 1 Seymour St., Dundas Valley, NSW 2117, Australia
> PHONE: +61 2 9871 4742 INTERNET: Mark_Andrews at isc.org
>
>
>
More information about the bind-users
mailing list