Package: ifupdown
Version: 0.7.48.1
Severity: normal
Tags: upstream, ipv6

Hi,

My system has this:

 doublan-1# cat /etc/network/interfaces
 auto lo
 iface lo inet loopback

 auto eth0
 iface eth0 inet static
        address 137.56.165.54
        netmask 255.255.255.0
        gateway 137.56.165.1

 iface eth0 inet6 static
        address 2001:610:1410:480:f35e:2a02::54
        netmask 64

 iface eth0:0 inet static
        address 137.56.165.59
        netmask 255.255.255.0

 iface eth0:0 inet6 static
        address 2001:610:1410:480:f35e:2a02::59
        netmask 64

 doublan-1# ip a l eth0
 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state 
UNKNOWN qlen 1000
    link/ether 00:50:56:13:01:aa brd ff:ff:ff:ff:ff:ff
    inet 137.56.165.54/24 brd 137.56.165.255 scope global eth0
    inet6 2001:610:1410:480:f35e:2a02:0:54/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::250:56ff:fe13:1aa/64 scope link
       valid_lft forever preferred_lft forever

Now, if I run

 doublan-1# ifup eth0:0

I am happy to get:

 doublan-1# ip a l eth0
 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state 
UNKNOWN qlen 1000
    link/ether 00:50:56:13:01:aa brd ff:ff:ff:ff:ff:ff
    inet 137.56.165.54/24 brd 137.56.165.255 scope global eth0
    inet 137.56.165.59/24 brd 137.56.165.255 scope global secondary eth0:0
    inet6 2001:610:1410:480:f35e:2a02:0:59/64 scope global deprecated
       valid_lft forever preferred_lft forever
    inet6 2001:610:1410:480:f35e:2a02:0:54/64 scope global
       valid_lft forever preferred_lft forever
    inet6 fe80::250:56ff:fe13:1aa/64 scope link
       valid_lft forever preferred_lft forever

However, if I now run:

 doublan-1# ifdown eth0:0

I am _not_ happy to get:

 doublan-1# ip a l eth0
 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state 
UNKNOWN qlen 1000
    link/ether 00:50:56:13:01:aa brd ff:ff:ff:ff:ff:ff
    inet 137.56.165.54/24 brd 137.56.165.255 scope global eth0
    inet6 fe80::250:56ff:fe13:1aa/64 scope link
       valid_lft forever preferred_lft forever

Only the legacy IPv4 adress survived this action, I am missing:

    inet6 2001:610:1410:480:f35e:2a02:0:54/64 scope global
       valid_lft forever preferred_lft forever

.

This seems to be caused by differences in IPv4 vs IPv6 handling.  In the
IPv4-case, ifdown calls:

        ip -4 addr flush dev eth0:0 label eth0:0

which is fine, since only the eth0:0 adresses cary this label.
In the IPv6-case, ifdown calls:

        ip -6 addr flush dev eth0:0 scope global

which breaks, since the kernel interprets “eth0:0” as “eth0”.

This bug has been seen with ifupdown version 0.7.8.  I cannot easily test it on
a system running 0.7.48.1 (which is in testing/jessie and sid now).  However,
since the relevant code hasn't been changed, I'm convinced ifupdown 0.7.48.1 is
broken in the same way.

Thanks, Bye,

Joost

-- 
Joost van Baal-Ilić                       http://abramowitz.uvt.nl/
                                                 Tilburg University
mailto:joostvb.uvt.nl                               The Netherlands

Attachment: signature.asc
Description: Digital signature

Reply via email to