#798290 ifupdown fails to add multiple IP's when using $IFACE as an argument to ip run via the up command

Package:
ifupdown
Source:
ifupdown
Description:
high level tools to configure network interfaces
Submitter:
Ivan Lezhnjov IV
Date:
2015-09-22 21:06:10 UTC
Severity:
normal
#798290#5
Date:
2015-09-07 18:34:37 UTC
From:
To:
I attempted to add multiple IP addresses via the up command specifying interface for the ip command argument as $IFACE:

up ip a a 172.32.0.1 dev $IFACE
up ip a a 172.32.0.2 dev $IFACE

and discovered that only one of the two (or more) addresses is added to an interface.

After some troubleshooting I figured out that if I replaced $IFACE with whatever was the interface device name, e.g. eth0, ifup would add multiple ip addresses just fine.

I tested this on Ubuntu Precise LTS (sorry, but I do not have a Debian system to test this and I believe Ubuntu didn't really change anything about ifupdown programs that would affect this bug report's applicability), by adding those up commands to an end of an auto stanza.

For example:

auto eth0
iface eth0 inet static
        address 1.1.1.2
        netmask 255.255.255.0
        network 1.1.1.0
        broadcast 1.1.1.255
        gateway 1.1.1.1
        up iptables-restore < /etc/iptables/cmdalert-fw.rules
	up ip a a 172.32.0.1 dev $IFACE
	up ip a a 172.32.0.2 dev $IFACE

and then followed up immediately by rebooting OS. To iterate, replacing $IFACE with eth0 results in both IP addresses added to eth0. Otherwise, only one of them can be added.

This seems like a serious bug to me, and I don't know if it was fixed yet or not, but here it is for your attention.

#798290#10
Date:
2015-09-22 21:03:01 UTC
From:
To:
tags 798290 + unreproducible
thanks

I'm sorry, but I cannot reproduce this problem. I've tried it with
exactly the stanza you mentioned, but both ip a a commands are executed
correctly.

If you tested this on an Ubuntu system, then you should report the bug
to the Ubuntu bug tracking system, regardless of whether or not Ubuntu's
ifupdown is different compared to the Debian one, especially if you want
this to be fixed in Precise LTS.

This is a rather old version that has not been part of any stable
release in Debian.