ipv4: fix route deletion for IPs on many subnets
authorJulian Anastasov <ja@ssi.bg>
Sat, 19 Mar 2011 12:13:49 +0000 (12:13 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 22 Mar 2011 08:06:32 +0000 (01:06 -0700)
commite6abbaa2725a43cf5d26c4c2a5dc6c0f6029ea19
tree65d9d9deb7259322e83fc750b98f4ad9f7a51f56
parent74cb3c108bc0f599a4eb40980db8580cfba725c9
ipv4: fix route deletion for IPs on many subnets

Alex Sidorenko reported for problems with local
routes left after IP addresses are deleted. It happens
when same IPs are used in more than one subnet for the
device.

Fix fib_del_ifaddr to restrict the checks for duplicate
local and broadcast addresses only to the IFAs that use
our primary IFA or another primary IFA with same address.
And we expect the prefsrc to be matched when the routes
are deleted because it is possible they to differ only by
prefsrc. This patch prevents local and broadcast routes
to be leaked until their primary IP is deleted finally
from the box.

As the secondary address promotion needs to delete
the routes for all secondaries that used the old primary IFA,
add option to ignore these secondaries from the checks and
to assume they are already deleted, so that we can safely
delete the route while these IFAs are still on the device list.

Reported-by: Alex Sidorenko <alexandre.sidorenko@hp.com>
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/route.h
net/ipv4/fib_frontend.c
This page took 0.026086 seconds and 5 git commands to generate.