aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/neighbour.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2019-05-07 17:22:09 -0700
committerDavid S. Miller <davem@davemloft.net>2019-05-07 17:22:09 -0700
commita9e41a529681b38087c91ebc0bb91e12f510ca2d (patch)
tree544bf5861113e2f7e676a333a1267d887c800870 /net/core/neighbour.c
parentnet: phy: improve pause mode reporting in phy_print_status (diff)
parentcxgb4: Fix error path in cxgb4_init_module (diff)
downloadlinux-dev-a9e41a529681b38087c91ebc0bb91e12f510ca2d.tar.xz
linux-dev-a9e41a529681b38087c91ebc0bb91e12f510ca2d.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Minor conflict with the DSA legacy code removal. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/neighbour.c')
-rw-r--r--net/core/neighbour.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index e73bfc63e473..dfa871061f14 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -31,6 +31,7 @@
#include <linux/times.h>
#include <net/net_namespace.h>
#include <net/neighbour.h>
+#include <net/arp.h>
#include <net/dst.h>
#include <net/sock.h>
#include <net/netevent.h>
@@ -663,6 +664,8 @@ out:
out_tbl_unlock:
write_unlock_bh(&tbl->lock);
out_neigh_release:
+ if (!exempt_from_gc)
+ atomic_dec(&tbl->gc_entries);
neigh_release(n);
goto out;
}
@@ -2990,7 +2993,13 @@ int neigh_xmit(int index, struct net_device *dev,
if (!tbl)
goto out;
rcu_read_lock_bh();
- neigh = __neigh_lookup_noref(tbl, addr, dev);
+ if (index == NEIGH_ARP_TABLE) {
+ u32 key = *((u32 *)addr);
+
+ neigh = __ipv4_neigh_lookup_noref(dev, key);
+ } else {
+ neigh = __neigh_lookup_noref(tbl, addr, dev);
+ }
if (!neigh)
neigh = __neigh_create(tbl, addr, dev, false);
err = PTR_ERR(neigh);