[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#593205: marked as done (udhcpd: udhpcd does not bind to the correct interface)



Your message dated Fri, 29 Apr 2011 22:48:27 +0400
with message-id <4DBB07FB.1070502@msgid.tls.msk.ru>
and subject line Re: Bug#593205: udhcpd: udhpcd does not bind to the correct interface
has caused the Debian Bug report #593205,
regarding udhcpd: udhpcd does not bind to the correct interface
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
593205: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=593205
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: udhcpd
Version: 0.9.8cvs20050303-2.1
Severity: normal

Hello,

Using udhcpd on a multihomed server, it seems not to use the "interface" directive
in udhcpd.conf.

Booth using a vlan syntaxe :
interface eth1.1
or a physical interface :
interface eth2

result in udhcpd binding/listening to all the interface :
$ sudo netstat -natup | grep udh
udp        0      0 0.0.0.0:67              0.0.0.0:*                           22746/udhcpd

and distributing the lease in the wrong network through eth0.

Thanks.

@+,
	Fab

-- System Information:
Debian Release: 5.0.5
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686-bigmem (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages udhcpd depends on:
ii  libc6                       2.7-18lenny4 GNU C Library: Shared libraries

udhcpd recommends no packages.

udhcpd suggests no packages.



--- End Message ---
--- Begin Message ---
Version: 0.9.8cvs20050303-2.1

27.08.2010 04:25, Otavio Salvador wrote:
> Hello Fabrice,
> 
> On Mon, Aug 16, 2010 at 5:49 AM, Fabrice LORRAIN
> <Fabrice.Lorrain@univ-mlv.fr> wrote:
>> Package: udhcpd
>> Version: 0.9.8cvs20050303-2.1
>> Severity: normal
>>
>> Hello,
>>
>> Using udhcpd on a multihomed server, it seems not to use the "interface" directive
>> in udhcpd.conf.
[udp   0  0 0.0.0.0:67  0.0.0.0:*     22746/udhcpd]

This is how dhcpd works.  It must bind to all-zeros in order to
be able to receive all-broadcast requests sent from zero IP.
If an interface is given it uses SO_BINDTODEVICE socket option
to only receive traffic from a given network device, like this
(from strace):

socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP) = 5
setsockopt(5, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
setsockopt(5, SOL_SOCKET, SO_BROADCAST, [1], 4) = 0
setsockopt(5, SOL_SOCKET, SO_BINDTODEVICE, "if-onlime\0\0\0\0\0\0\0\4\0\0\0\2\0\0\0\21\0\0\0\35\360\4\10", 32) = 0
bind(5, {sa_family=AF_INET, sin_port=htons(67), sin_addr=inet_addr("0.0.0.0")}, 16) = 0

(I told it to bind to if-onlime interface).  So it all works
as expected.

> This version is quite old; please test the one in squeeze since it is
> up-to-date.

And it works as expected in both older version and the new
busybox-based version too.  So closing this bug now.

Thanks!

/mjt


--- End Message ---

Reply to: