Bug 5438 - udhcpd doesn't work on aliased interface
Summary: udhcpd doesn't work on aliased interface
Status: VERIFIED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Networking (show other bugs)
Version: 1.18.x
Hardware: Other Linux
: P5 minor
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-06 20:10 UTC by Mikhail Z
Modified: 2012-08-13 15:59 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail Z 2012-08-06 20:10:46 UTC
I want to run udhcpd on an aliased interface eth0:0

I modified /etc/udhcpd.conf interface config line like this:
interface       eth0:0    #default: eth0

But when I run udhcpd it fails aright away:
[root@ST600 /]# ifconfig eth0:0
eth0:0    Link encap:Ethernet  HWaddr 24:DB:AD:00:12:4B
          inet addr:10.0.54.51  Bcast:10.0.54.63  Mask:255.255.255.192
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

[root@ST600 /]# udhcpd -f /etc/udhcpd.conf
udhcpd: can't bind to interface eth0:0: No such device
[root@ST600 /]#
Comment 1 Mikhail Z 2012-08-06 20:17:52 UTC
Here's output when running with -vv:

[root@ST600 /]# udhcpd -vvf /etc/udhcpd.conf
Attaching option 03 to list
Attaching option 33 to list
Read 0 leases
IP 10.0.54.51
Adapter index 3
MAC 24:db:ad:00:12:4b
Opening listen socket on *:67 eth0:0
udhcpd: can't bind to interface eth0:0: No such device
[root@ST600 /]#
Comment 2 Mikhail Z 2012-08-06 20:31:14 UTC
This is running on embedded Linux 2.6.31.12 on a powerpc arch (MPC8xx).

Also it looks related to bug https://bugs.busybox.net/show_bug.cgi?id=5432 because in both issues the failure seems to be in "setsockopt_bindtodevice()".
Comment 3 Denys Vlasenko 2012-08-09 22:29:41 UTC
Should be fixed by

http://git.busybox.net/busybox/commit/?id=6567edd10b0ebd3333f4283decd90e1d57a42885

Please reopen if it is not.
Comment 4 Mikhail Z 2012-08-13 15:59:16 UTC
The patch worked, thanks.