• Thomas Haller's avatar
    ipv6 addrconf: don't cleanup prefix route for IFA_F_NOPREFIXROUTE · 5b84efec
    Thomas Haller authored
    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>
    5b84efec
addrconf.c 128 KB