mirror_iproute2/lib
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
..
dnet_ntop.c (Logical change 1.3) 2004-04-15 20:56:59 +00:00
dnet_pton.c (Logical change 1.3) 2004-04-15 20:56:59 +00:00
inet_proto.c (Logical change 1.3) 2004-04-15 20:56:59 +00:00
ipx_ntop.c Remove trailing whitespace 2006-12-05 10:10:22 -08:00
ipx_pton.c (Logical change 1.3) 2004-04-15 20:56:59 +00:00
libnetlink.c flush secondary addresses before primary ones 2009-12-26 10:11:02 -08:00
ll_addr.c iproute2: Format IPv6 tunnels endpoints nicely. 2007-06-19 16:29:05 -07:00
ll_map.c iproute2: Add ll_index_to_addr function 2009-12-01 15:54:16 -08:00
ll_proto.c Add support Controller Area Network 2009-03-27 11:21:29 -07:00
ll_types.c Add support Controller Area Network 2009-03-27 11:21:29 -07:00
Makefile iproute2: use -fPIC in lib/ 2009-12-01 16:17:59 -08:00
rt_names.c Add DHCP as routing protocol 2009-03-18 13:33:12 -07:00
utils.c Remove Changes: comments 2009-12-01 15:49:48 -08:00