diff options
author | Pavel Emelyanov <xemul@parallels.com> | 2012-08-08 21:53:36 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-08-09 16:18:07 -0700 |
commit | 1fb9489bf190ce2b3fc03891f3de4b2d30600e28 (patch) | |
tree | da4e17036949e72ae0b1f0fc3b6b31557de18353 /net/ipv6 | |
parent | aa79e66eee5d525e2fcbd2a5fcb87ae3dd4aa9e9 (diff) | |
download | op-kernel-dev-1fb9489bf190ce2b3fc03891f3de4b2d30600e28.zip op-kernel-dev-1fb9489bf190ce2b3fc03891f3de4b2d30600e28.tar.gz |
net: Loopback ifindex is constant now
As pointed out, there are places, that access net->loopback_dev->ifindex
and after ifindex generation is made per-net this value becomes constant
equals 1. So go ahead and introduce the LOOPBACK_IFINDEX constant and use
it where appropriate.
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/route.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 8e80fd2..0ddf2d1 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -965,7 +965,7 @@ struct dst_entry * ip6_route_output(struct net *net, const struct sock *sk, { int flags = 0; - fl6->flowi6_iif = net->loopback_dev->ifindex; + fl6->flowi6_iif = LOOPBACK_IFINDEX; if ((sk && sk->sk_bound_dev_if) || rt6_need_strict(&fl6->daddr)) flags |= RT6_LOOKUP_F_IFACE; |