iproute2: Fix filtering related to flushing IP addresses.
The old 'ip addr flush' logic had several flaws: * It reversed logic for primary v/s secondary flags (though, it sort of worked right anyway) * The code tried to remove secondaries and then primaries, but in practice, it always removed one primary per loop, which not at all efficient. * The filter logic in the core would run only the first filter in most cases. * If you used '-s -s', the ifa_flags member would be modified, which could make future filters fail to function fine. This patch attempts to fix all of these issues. Tested-by: Brian Haley <brian.haley@hp.com> Signed-off-by: Ben Greear <greearb@candelatech.com>
Showing
Please register or sign in to comment