BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001601 [BusyBox] Networking Support minor always 11-21-07 08:10 11-23-07 00:35
Reporter iggarpe View Status public  
Assigned To BusyBox
Priority normal Resolution fixed  
Status closed   Product Version svn
Summary 0001601: No (or wrong) support for virtual interfaces in ifup, ifdown, /etc/network/interfaces.
Description If you define, for example, interface eth0:0 as follows in /etc/network/interfaces:

iface eth0 inet static

iface eth0:0 inet static
    address 192.168.100.10
    netmask 255.255.255.0

And then you try to activate it with "ifup eth0:0", ifup will NOT complain about anything but will actually configure eth0 instead of eth0:0.

(it will configure eth0 using the configuration specified for eth0:0)
Additional Information
Attached Files

- Relationships

- Notes
(0002945)
iggarpe
11-21-07 10:10

The following code snippet is from file networking/ifupdown.c, function get_var:

    if (strncmpz(id, "iface", idlen) == 0) {
        char *result;
        static char label_buf[20];
        safe_strncpy(label_buf, ifd->iface, sizeof(label_buf));
        result = strchr(label_buf, ':');
        if (result) {
            *result = '\0';
        }
        return label_buf;
    }

Clearly it is intentionally ripping off the virtual interface suffic ":n", and that's the reason "ifup eth0:0" will wrongly issue commands for eth0 instead of eth0:0.

Any ideas about why the code is removing the ":n" ???

(I just checked and the ifup that comes with my ubuntu development machine works as espected, properly issuing commands and configuring virtual interfaces)
 
(0002949)
vda
11-22-07 18:54

Nice bug report.

Please try removing this:

        result = strchr(label_buf, ':');
        if (result) {
            *result = '\0';
        }

Does it work now?
 
(0002950)
iggarpe
11-23-07 00:21

Indeed I tried to remove that code even before attaching the note and it works fine, as expected.

In the note I just point out where I think the problem is because it is so obviously not a bug, but that the programmer INTENTIONALLY removed the colon and number for virtual interfaces, so I though there might be a good reason to it.

I
 
(0002951)
vda
11-23-07 00:35

Did that in svn, thanks.
 

- Issue History
Date Modified Username Field Change
11-21-07 08:10 iggarpe New Issue
11-21-07 08:10 iggarpe Status new => assigned
11-21-07 08:10 iggarpe Assigned To  => BusyBox
11-21-07 10:10 iggarpe Note Added: 0002945
11-22-07 18:54 vda Note Added: 0002949
11-22-07 18:54 vda Status assigned => feedback
11-23-07 00:21 iggarpe Note Added: 0002950
11-23-07 00:35 vda Status feedback => closed
11-23-07 00:35 vda Note Added: 0002951
11-23-07 00:35 vda Resolution open => fixed


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker