[BusyBox 0001032]: udhcp does not support ethernet aliases

bugs at busybox.net bugs at busybox.net
Wed Nov 29 00:16:08 UTC 2006


A NOTE has been added to this issue. 
====================================================================== 
http://busybox.net/bugs/view.php?id=1032 
====================================================================== 
Reported By:                teg
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   1032
Category:                   
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     feedback
====================================================================== 
Date Submitted:             09-19-2006 01:01 PDT
Last Modified:              11-28-2006 16:16 PST
====================================================================== 
Summary:                    udhcp does not support ethernet aliases
Description: 
I have multiple aliases for eth0 (eth0:1, eth0:2, etc.) and I run invidual
udhcpc for each interface. Every interface will get IP address, but after
a while (lease time?) when renew(?) comes, every udhcpc dies.
====================================================================== 

---------------------------------------------------------------------- 
 teg - 09-19-06 01:38  
---------------------------------------------------------------------- 
When it dies, It reports:

debug, Sending renew...
error, FATAL: couldn't listen on socket, No such device 

---------------------------------------------------------------------- 
 bernhardf - 09-30-06 13:51  
---------------------------------------------------------------------- 
I recommend you to use the version of udhcp that is in busybox. AFAIK the
stand-alone udhcpd currently isn't actively maintained as opposed to the
version in busybox.
If you do not need any other applets from busybox, then just turn them
off.

HTH 

---------------------------------------------------------------------- 
 teg - 10-01-06 03:15  
---------------------------------------------------------------------- 
I AM using busybox version. 

---------------------------------------------------------------------- 
 bernhardf - 10-01-06 05:47  
---------------------------------------------------------------------- 
Reported against wrong project; Assigning to busybox. 

---------------------------------------------------------------------- 
 vda - 11-27-06 12:10  
---------------------------------------------------------------------- 
Need a bit of help debugging it. It happens here:

                if (listen_mode != LISTEN_NONE && fd < 0) {
                        if (listen_mode == LISTEN_KERNEL)
                                fd = listen_socket(INADDR_ANY,
CLIENT_PORT, client_config.interface);
                        else
                                fd = raw_socket(client_config.ifindex);
                        if (fd < 0) {
                                bb_perror_msg("FATAL: cannot listen on
socket");
                                return 0;

Can you check that it happens in listen_socket? (Just add a printf before
it).
Next, listen_socket() itself is in socket.c. Please add this line with
'+'. What does this printf prints for you?

        strncpy(interface.ifr_name, inf, IFNAMSIZ);
        if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, (char
*)&interface, sizeof(interface)) < 0) {
+printf("BINDTODEVICE '%s' failed\n", inf);
                close(fd);
                return -1;
        } 

---------------------------------------------------------------------- 
 teg - 11-27-06 12:13  
---------------------------------------------------------------------- 
I'm using it on a Linksys router, but I don't have development environment
currently installed. I'll try to set up that first for debugging. 

---------------------------------------------------------------------- 
 vda - 11-28-06 16:16  
---------------------------------------------------------------------- 
Most likely fixed in svn. Bug is to be closed after a few weeks unless svn
is reported to not work. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
09-19-06 01:01  teg            New Issue                                    
09-19-06 01:01  teg            Issue Monitored: teg                         
09-19-06 01:38  teg            Note Added: 0001636                          
09-30-06 13:51  bernhardf      Note Added: 0001669                          
10-01-06 03:15  teg            Note Added: 0001679                          
10-01-06 05:47  bernhardf      Note Added: 0001681                          
10-01-06 05:47  bernhardf      Assigned To               => BusyBox         
10-01-06 05:47  bernhardf      Status                   new => assigned     
10-01-06 05:48  bernhardf      Project                  udhcp => BusyBox    
11-27-06 12:10  vda            Note Added: 0001814                          
11-27-06 12:10  vda            Status                   assigned => feedback
11-27-06 12:13  teg            Note Added: 0001816                          
11-28-06 16:16  vda            Note Added: 0001829                          
======================================================================




More information about the busybox-cvs mailing list