iproute2/include
Simon Horman b49240ec7e flush secondary addresses before primary ones
Unless promote_secondaries has been active deleting the primary address of
an interface will automatically delete all the secondary addresses.

In the case where ip flush requests the primary then secondary addresses to
be removed - which is the order the addresses are returned by the kernel -
this will cause an error as by the time the request to remove a secondary
address is made it will be missing as it will have been deleted in the
course of deleting the primary address.

This approach to solving this problem orders requests for the
deletion of secondary addresses before primary ones providing
rtnl_dump_filter_l(), a version of rtnl_dump_filter() that
iterates over a list of filters. And by providing two specialised
filters print_addrinfo_secondary() and print_addrinfo_primary().

rtnl_dump_filter_l() first iterates over all addresses using
print_addrinfo_secondary(), which appends secondary addresses to the
request buffer.  Then again using print_addrinfo_primary() which appends
primary addresses.

This approach should work regardless of it promote_secondaries is
active or not. And regardless of if any primary of secondary addresses
are present or not.

Signed-off-by: Simon Horman <horms@verge.net.au>
2009-12-26 10:11:02 -08:00
..
libiptc iproute2: Support IFF_LOWER_UP and IFF_DORMANT 2007-06-19 16:40:40 -07:00
linux Update to 2.6.32 kernel headers 2009-11-10 08:51:17 -08:00
netinet add include/netinet/tcp.h 2007-12-31 12:56:08 -08:00
SNAPSHOT.h iproute2-091117 2009-11-17 10:04:57 -08:00
dlfcn.h support static-only systems 2009-11-10 10:44:20 -08:00
ip6tables.h Remove trailing whitespace 2006-12-05 10:10:22 -08:00
iptables.h Remove trailing whitespace 2006-12-05 10:10:22 -08:00
iptables_common.h fix build warnings 2007-06-20 10:55:18 -07:00
libnetlink.h flush secondary addresses before primary ones 2009-12-26 10:11:02 -08:00
ll_map.h iproute2: Add ll_index_to_addr function 2009-12-01 15:54:16 -08:00
rt_names.h Add support for larger number of routing tables 2006-08-10 16:12:07 -07:00
rtm_map.h (Logical change 1.3) 2004-04-15 20:56:59 +00:00
utils.h ip maddr show” on an infiniband address causes a stack corruption 2009-01-06 18:56:03 -08:00
xt-internal.h Breakage noticed when debian upgraded to xtables (iptables > 1.4.1) 2009-02-19 09:02:13 -08:00