• Eric Dumazet's avatar
    ipv6: give an IPv6 dev to blackhole_netdev · e5f80fcf
    Eric Dumazet authored
    IPv6 addrconf notifiers wants the loopback device to
    be the last device being dismantled at netns deletion.
    
    This caused many limitations and work arounds.
    
    Back in linux-5.3, Mahesh added a per host blackhole_netdev
    that can be used whenever we need to make sure objects no longer
    refer to a disappearing device.
    
    If we attach to blackhole_netdev an ip6_ptr (allocate an idev),
    then we can use this special device (which is never freed)
    in place of the loopback_dev (which can be freed).
    
    This will permit improvements in netdev_run_todo() and other parts
    of the stack where had steps to make sure loopback_dev was
    the last device to disappear.
    Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
    Cc: Mahesh Bandewar <maheshb@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    e5f80fcf
addrconf.c 178 KB