lkml.org 
[lkml]   [1997]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: SO_BINDTODEVICE and dhcpd - howto?

edge@dux.raex.com said:
> However, when I run dhcpd it gives me an error trying to set this
> option and exits. Is there anything special that I need to do to
> allow SO_BINDTODEVICE to work?

Which kernel, which version of dhcpd, etc....

Sorry for the omissions. They are obviously rather important.

I'm using 2.0.31 no patches; dhcpd is the latest development version,
dhcp-970609. The line of code where it fails (line 145 in socket.c):

#ifdef SO_BINDTODEVICE
/* Bind this socket to this interface. */
if (setsockopt (sock, SOL_SOCKET, SO_BINDTODEVICE,
(char *)(info -> ifp), sizeof *(info -> ifp)) < 0) {
error("setting SO_BINDTODEVICE");
}
#endif

No strace handy, unfortunately...

> Naturally, if you try it on a 2.1.5x kernel, I'll be more useful, as the
> SO_BINDTODEVICE code is fairly different between 2.1 and 2.0 - the routing
> code has changed a lot in between.

Hmm. I haven't been keeping up with 2.1.x but if there are no clues I'll
have to load up the latest.

Thanks for your assistance!
Mark









\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.026 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site