All of lore.kernel.org
 help / color / mirror / Atom feed
* iproute2: ip addr flush fail on many secondary addresses
@ 2014-03-12 14:45 Martin Vopatek
  0 siblings, 0 replies; only message in thread
From: Martin Vopatek @ 2014-03-12 14:45 UTC (permalink / raw)
  To: netdev

Hi!

ip addr flush dev eth0

Returns:
Failed to send flush request: Cannot assign requested address
when I have many (> 62) secondary addresses.

Deletion is handled by ipaddr_flush sending two filters
(secondary/primary) to rtnl_dump_filter_l.

With a lot of addresses rtnl_dump_filter_l calls recvmsg
more than once. However, all filters are traversed for each
recv call, so the primary address will be deleted before
all the secondary addresses have been removed.

Running with stat the primary address is not the last.
ip -stat -stat addr flush dev eth0

Flushing secondary/primary addresses has been addressed before:
b49240ec7eab91418d2f090536bf8cd2205988d6
3bc1c4f29777171b484d36abf673667e3729202b

As mentioned there, trying to remove the remaining secondary
addresses will cause an error as they were auto removed when
deleting the primary.

Workaround:
sysctl -w net.ipv4.conf.all.promote_secondaries=1

Regards, vopatek

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-03-12 14:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-12 14:45 iproute2: ip addr flush fail on many secondary addresses Martin Vopatek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.