Your message dated Tue, 4 Nov 2014 13:23:07 +0100
with message-id <[email protected]>
and subject line closing
has caused the Debian Bug report #761950,
regarding /bin/ip: ip address flush primary ... behaviour not as described.
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
761950: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=761950
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
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

--- End Message ---
--- Begin Message ---
Hello!

Closing this bug report as there was no followup on my previous
inquiry for additional information and I'm thinking this likely
is a system configuration error rather then a bug in iproute2.

To be able to retain secondary addresses, you actually have
to configure the system to promote them when the primary
address is removed. Otherwise they will be removed when
their primary address is removed, as expected in that
configuration.

Regards,
Andreas Henriksson

--- End Message ---

Reply via email to