• Ido Schimmel's avatar
    ipv6: fib: Don't assume only nodes hold a reference on routes · c5b12410
    Ido Schimmel authored
    The code currently assumes that only FIB nodes can hold a reference on
    routes. Therefore, after fib6_purge_rt() has run and the route is no
    longer present in any intermediate nodes, it's assumed that its
    reference count would be 1 - taken by the node where it's currently
    stored.
    
    However, we're going to allow users other than the FIB to take a
    reference on a route, so this assumption is no longer valid and the
    BUG_ON() needs to be removed.
    
    Note that purging only takes place if the initial reference count is
    different than 1. I've left that check intact, as in the majority of
    systems (where routes are only referenced by the FIB), it does actually
    mean the route is present in intermediate nodes.
    Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
    Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    c5b12410
ip6_fib.c 48.4 KB