[BusyBox 0001601]: No (or wrong) support for virtual interfaces in ifup, ifdown, /etc/network/interfaces.

bugs at busybox.net bugs at busybox.net
Wed Nov 21 18:10:16 UTC 2007


A NOTE has been added to this issue. 
====================================================================== 
http://busybox.net/bugs/view.php?id=1601 
====================================================================== 
Reported By:                iggarpe
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   1601
Category:                   Networking Support
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             11-21-2007 08:10 PST
Last Modified:              11-21-2007 10:10 PST
====================================================================== 
Summary:                    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)
====================================================================== 

---------------------------------------------------------------------- 
 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) 

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                          
======================================================================




More information about the busybox-cvs mailing list