• Scott Feldman's avatar
    rocker: hook ndo_neigh_destroy to cleanup neigh refs in driver · dd19f83d
    Scott Feldman authored
    Rocker driver tracks arp_tbl neighs to resolve IPv4 route nexthops.  The
    driver uses NETEVENT_NEIGH_UPDATE for neigh adds and updates, but there is
    no event when the neigh is removed from the device (such as when the device
    goes admin down).  This patches hooks ndo_neigh_destroy so the driver can
    know when a neigh is removed from the device.  In response, the driver will
    purge the neigh entry from its internal tbl.
    
    I didn't find an in-tree users of ndo_neigh_destroy, so I'm not sure if
    this ndo is vestigial or if there are out-of-tree users.  In any case, it
    does what I need here.  An alternative design would be to generate
    NETEVENT_NEIGH_UPDATE event when neigh is being destroyed, setting state to
    NUD_NONE so driver knows neigh entry is dead.
    Signed-off-by: default avatarScott Feldman <sfeldma@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    dd19f83d
rocker.c 146 KB