Messages in this thread | | | Date | Wed, 29 Oct 1997 20:58:44 -0500 (EST) | From | Mark Lehrer <> | Subject | Re: 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
| |