]> bbs.cooldavid.org Git - net-next-2.6.git/commit - include/net/neighbour.h
[NET]: Fix neighbour destructor handling.
authorAlexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Sat, 24 Mar 2007 19:52:16 +0000 (12:52 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Mon, 26 Mar 2007 01:48:01 +0000 (18:48 -0700)
commitecbb416939da77c0d107409976499724baddce7b
tree313f786f9f4d5fec3f016c292dea1705924fa9b6
parente1701c68c1d1aeb3213d7016593ea9a1d4309417
[NET]: Fix neighbour destructor handling.

->neigh_destructor() is killed (not used), replaced with
->neigh_cleanup(), which is called when neighbor entry goes to dead
state. At this point everything is still valid: neigh->dev,
neigh->parms etc.

The device should guarantee that dead neighbor entries (neigh->dead !=
0) do not get private part initialized, otherwise nobody will cleanup
it.

I think this is enough for ipoib which is the only user of this thing.
Initialization private part of neighbor entries happens in ipib
start_xmit routine, which is not reached when device is down.  But it
would be better to add explicit test for neigh->dead in any case.

Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/infiniband/ulp/ipoib/ipoib_main.c
include/net/neighbour.h
net/atm/clip.c
net/core/neighbour.c