Skip to content
Commit 5b84efec authored by Thomas Haller's avatar Thomas Haller Committed by David S. Miller
Browse files

ipv6 addrconf: don't cleanup prefix route for IFA_F_NOPREFIXROUTE



Refactor the deletion/update of prefix routes when removing an
address. Now also consider IFA_F_NOPREFIXROUTE and if there is an address
present with this flag, to not cleanup the route. Instead, assume
that userspace is taking care of this route.

Also perform the same cleanup, when userspace changes an existing address
to add NOPREFIXROUTE (to an address that didn't have this flag). This is
done because when the address was added, a prefix route was created for it.
Since the user now wants to handle this route by himself, we cleanup this
route.

This cleanup of the route is not totally robust. There is no guarantee,
that the route we are about to delete was really the one added by the
kernel. This behavior does not change by the patch, and in practice it
should work just fine.

Signed-off-by: default avatarThomas Haller <thaller@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 761aac73
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment