Package: iproute
Version: 20120521-3+b3
Severity: important
File: /bin/ip
Dear Maintainer,
* What led up to the situation?
I was experimenting with ip address as a replacement for ifconfig
and discovered something which surprised me.
# ip address flush dev eth0 primary label eth0:foo
will delete all the addresses under label eth0:foo not just the
primary one.
* What outcome did you expect instead?
as the man pages describes ip address flush as using the same
parameters as ip address show. I expected it to delete only the first
address under that label.
eg:
root@crackle:~# ## make 5 addresses
root@crackle:~#
root@crackle:~# ip address add local 10.11.22.31/8 label eth0:foo dev eth0
root@crackle:~# ip address add local 10.11.22.32/8 label eth0:foo dev eth0
root@crackle:~# ip address add local 10.11.22.33/8 label eth0:foo dev eth0
root@crackle:~# ip address add local 10.11.22.34/8 label eth0:foo dev eth0
root@crackle:~# ip address add local 10.11.22.35/8 label eth0:foo dev eth0
root@crackle:~#
root@crackle:~# ## list them
root@crackle:~#
root@crackle:~# ip address show dev eth0 label eth0:foo
inet 10.11.22.31/8 scope global eth0:foo
inet 10.11.22.32/8 scope global secondary eth0:foo
inet 10.11.22.33/8 scope global secondary eth0:foo
inet 10.11.22.34/8 scope global secondary eth0:foo
inet 10.11.22.35/8 scope global secondary eth0:foo
root@crackle:~#
root@crackle:~# ## use the primary flag:
root@crackle:~#
root@crackle:~# ip address show dev eth0 primary label eth0:foo
inet 10.11.22.31/8 scope global eth0:foo
root@crackle:~#
root@crackle:~# ## only listsed 10.11.22.31
root@crackle:~# ## but this will delete them all
root@crackle:~#
root@crackle:~# ip address flush dev eth0 primary label eth0:foo
root@crackle:~#
root@crackle:~# ## list them again:
root@crackle:~#
root@crackle:~# ip address show dev eth0 label eth0:foo
root@crackle:~#
root@crackle:~# ## they're all gone. :(
"secondary" works as expected, just not "primary".
I can guess why this might be, but the manual should probably
warn about it.
-- System Information:
Debian Release: 7.6
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_NZ.UTF-8, LC_CTYPE=en_NZ.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages iproute depends on:
ii libc6 2.13-38+deb7u4
ii libdb5.1 5.1.29-5
Versions of packages iproute recommends:
pn libatm1 <none>
Versions of packages iproute suggests:
pn iproute-doc <none>
-- debconf-show failed
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]