aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorAlexey Kuznetsov <kuznet@ms2.inr.ac.ru>2007-03-24 15:52:16 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-03-25 21:48:01 -0400
commitecbb416939da77c0d107409976499724baddce7b (patch)
tree313f786f9f4d5fec3f016c292dea1705924fa9b6 /include/net
parente1701c68c1d1aeb3213d7016593ea9a1d4309417 (diff)
[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>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/neighbour.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/neighbour.h b/include/net/neighbour.h
index 3725b93c52f3..ad7fe1121412 100644
--- a/include/net/neighbour.h
+++ b/include/net/neighbour.h
@@ -36,7 +36,7 @@ struct neigh_parms
36 struct net_device *dev; 36 struct net_device *dev;
37 struct neigh_parms *next; 37 struct neigh_parms *next;
38 int (*neigh_setup)(struct neighbour *); 38 int (*neigh_setup)(struct neighbour *);
39 void (*neigh_destructor)(struct neighbour *); 39 void (*neigh_cleanup)(struct neighbour *);
40 struct neigh_table *tbl; 40 struct neigh_table *tbl;
41 41
42 void *sysctl_table; 42 void *sysctl_table;