summaryrefslogtreecommitdiff
path: root/net/core/neighbour.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-12-19 15:04:41 -0500
committerDavid S. Miller <davem@davemloft.net>2011-12-19 15:04:41 -0500
commit447f219190bf0368b8b36cf60155744cb43510df (patch)
tree7e6c95b20ea8fe8f819fceb7399602df72061c48 /net/core/neighbour.c
parent72be84f1c21c0ddba1081291072d7acc9ccddf5f (diff)
downloadlwn-447f219190bf0368b8b36cf60155744cb43510df.tar.gz
lwn-447f219190bf0368b8b36cf60155744cb43510df.zip
Revert "net: Remove unused neighbour layer ops."
This reverts commit 5c3ddec73d01a1fae9409c197078cb02c42238c3. S390 qeth driver actually still uses the setup ops. Reported-by: Frank Blaschka <blaschka@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/neighbour.c')
-rw-r--r--net/core/neighbour.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index d57a40a2598c..4af151e1bf5d 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -497,6 +497,13 @@ struct neighbour *neigh_create(struct neigh_table *tbl, const void *pkey,
}
}
+ /* Device specific setup. */
+ if (n->parms->neigh_setup &&
+ (error = n->parms->neigh_setup(n)) < 0) {
+ rc = ERR_PTR(error);
+ goto out_neigh_release;
+ }
+
n->confirmed = jiffies - (n->parms->base_reachable_time << 1);
write_lock_bh(&tbl->lock);
@@ -710,6 +717,9 @@ void neigh_destroy(struct neighbour *neigh)
skb_queue_purge(&neigh->arp_queue);
neigh->arp_queue_len_bytes = 0;
+ if (dev->netdev_ops->ndo_neigh_destroy)
+ dev->netdev_ops->ndo_neigh_destroy(neigh);
+
dev_put(dev);
neigh_parms_put(neigh->parms);