• Pablo Neira Ayuso's avatar
    netfilter: nf_tables_netdev: unregister hooks on net_device removal · 835b8033
    Pablo Neira Ayuso authored
    In case the net_device is gone, we have to unregister the hooks and put back
    the reference on the net_device object. Once it comes back, register them
    again. This also covers the device rename case.
    
    This patch also adds a new flag to indicate that the basechain is disabled, so
    their hooks are not registered. This flag is used by the netdev family to
    handle the case where the net_device object is gone. Currently this flag is not
    exposed to userspace.
    Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
    835b8033
nf_tables.h 26.9 KB