aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/route.c
diff options
context:
space:
mode:
authorDavid Miller <davem@davemloft.net>2011-07-24 20:01:41 -0400
committerDavid S. Miller <davem@davemloft.net>2011-11-30 18:51:03 -0500
commit32092ecf0644e91070f9eff4f6e1edda8f90aecc (patch)
tree3e2e2a111364f08653b79fd7404346e9f4b5ee84 /net/ipv4/route.c
parentda6a8fa0275e2178c44a875374cae80d057538d1 (diff)
atm: clip: Use device neigh support on top of "arp_tbl".
Instead of instantiating an entire new neigh_table instance just for ATM handling, use the neigh device private facility. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/route.c')
-rw-r--r--net/ipv4/route.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index fb47c8f0cd86..9a20663d5969 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -108,7 +108,6 @@
108#ifdef CONFIG_SYSCTL 108#ifdef CONFIG_SYSCTL
109#include <linux/sysctl.h> 109#include <linux/sysctl.h>
110#endif 110#endif
111#include <net/atmclip.h>
112#include <net/secure_seq.h> 111#include <net/secure_seq.h>
113 112
114#define RT_FL_TOS(oldflp4) \ 113#define RT_FL_TOS(oldflp4) \
@@ -1013,23 +1012,18 @@ static int slow_chain_length(const struct rtable *head)
1013 1012
1014static struct neighbour *ipv4_neigh_lookup(const struct dst_entry *dst, const void *daddr) 1013static struct neighbour *ipv4_neigh_lookup(const struct dst_entry *dst, const void *daddr)
1015{ 1014{
1016 struct neigh_table *tbl = &arp_tbl;
1017 static const __be32 inaddr_any = 0; 1015 static const __be32 inaddr_any = 0;
1018 struct net_device *dev = dst->dev; 1016 struct net_device *dev = dst->dev;
1019 const __be32 *pkey = daddr; 1017 const __be32 *pkey = daddr;
1020 struct neighbour *n; 1018 struct neighbour *n;
1021 1019
1022#if defined(CONFIG_ATM_CLIP) || defined(CONFIG_ATM_CLIP_MODULE)
1023 if (dev->type == ARPHRD_ATM)
1024 tbl = clip_tbl_hook;
1025#endif
1026 if (dev->flags & (IFF_LOOPBACK | IFF_POINTOPOINT)) 1020 if (dev->flags & (IFF_LOOPBACK | IFF_POINTOPOINT))
1027 pkey = &inaddr_any; 1021 pkey = &inaddr_any;
1028 1022
1029 n = __ipv4_neigh_lookup(tbl, dev, *(__force u32 *)pkey); 1023 n = __ipv4_neigh_lookup(&arp_tbl, dev, *(__force u32 *)pkey);
1030 if (n) 1024 if (n)
1031 return n; 1025 return n;
1032 return neigh_create(tbl, pkey, dev); 1026 return neigh_create(&arp_tbl, pkey, dev);
1033} 1027}
1034 1028
1035static int rt_bind_neighbour(struct rtable *rt) 1029static int rt_bind_neighbour(struct rtable *rt)