]> git.baikalelectronics.ru Git - 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)
commit6b90086fb92a3d1936036c21bf68baf6c125b2be
treea1487e383ad39c19412bd2c3c3fa3a91f4f3963a
parentbcbeee9f79d11b70162c0c319e1763f7bdaf8df4
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