]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
ipv6 addrconf: don't cleanup prefix route for IFA_F_NOPREFIXROUTE
authorThomas Haller <thaller@redhat.com>
Wed, 15 Jan 2014 14:36:59 +0000 (15:36 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 16 Jan 2014 01:00:40 +0000 (17:00 -0800)
commit5b84efecb7d939d06790b7bace5e513537d0767c
treea1487e383ad39c19412bd2c3c3fa3a91f4f3963a
parent761aac737eb11901c382a3f021dead59a26983fc
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: Thomas Haller <thaller@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/addrconf.c