aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/route.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-07-02 02:02:15 -0700
committerDavid S. Miller <davem@davemloft.net>2012-07-05 01:02:12 -0700
commita263b3093641fb1ec377582c90986a7fd0625184 (patch)
tree691fdb4703bb88611272bf958d9de1a461f1492a /net/ipv4/route.c
parentipv4: Fix crashes in ip_options_compile(). (diff)
downloadlinux-dev-a263b3093641fb1ec377582c90986a7fd0625184.tar.xz
linux-dev-a263b3093641fb1ec377582c90986a7fd0625184.zip
ipv4: Make neigh lookups directly in output packet path.
Do not use the dst cached neigh, we'll be getting rid of that. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--net/ipv4/route.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 6a5afc715558..2f40363e2851 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1098,17 +1098,13 @@ static int slow_chain_length(const struct rtable *head)
static struct neighbour *ipv4_neigh_lookup(const struct dst_entry *dst, const void *daddr)
{
- static const __be32 inaddr_any = 0;
struct net_device *dev = dst->dev;
const __be32 *pkey = daddr;
const struct rtable *rt;
struct neighbour *n;
rt = (const struct rtable *) dst;
-
- if (dev->flags & (IFF_LOOPBACK | IFF_POINTOPOINT))
- pkey = &inaddr_any;
- else if (rt->rt_gateway)
+ if (rt->rt_gateway)
pkey = (const __be32 *) &rt->rt_gateway;
n = __ipv4_neigh_lookup(dev, *(__force u32 *)pkey);