diff options
author | David S. Miller <davem@davemloft.net> | 2012-07-02 02:02:15 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-05 01:02:12 -0700 |
commit | a263b3093641fb1ec377582c90986a7fd0625184 (patch) | |
tree | 691fdb4703bb88611272bf958d9de1a461f1492a /net/ipv4/route.c | |
parent | 11604721a3c4bea60e2ddd9e4e30d741ecdba7b0 (diff) |
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 'net/ipv4/route.c')
-rw-r--r-- | net/ipv4/route.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 6a5afc71555..2f40363e285 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); |