aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/fib_frontend.c
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@parallels.com>2012-08-08 21:53:36 +0000
committerDavid S. Miller <davem@davemloft.net>2012-08-09 16:18:07 -0700
commit1fb9489bf190ce2b3fc03891f3de4b2d30600e28 (patch)
treeda4e17036949e72ae0b1f0fc3b6b31557de18353 /net/ipv4/fib_frontend.c
parentnet: Make ifindex generation per-net namespace (diff)
downloadlinux-dev-1fb9489bf190ce2b3fc03891f3de4b2d30600e28.tar.xz
linux-dev-1fb9489bf190ce2b3fc03891f3de4b2d30600e28.zip
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 '')
-rw-r--r--net/ipv4/fib_frontend.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index c43ae3fba792..7f073a38c87d 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -218,7 +218,7 @@ __be32 fib_compute_spec_dst(struct sk_buff *skb)
scope = RT_SCOPE_UNIVERSE;
if (!ipv4_is_zeronet(ip_hdr(skb)->saddr)) {
fl4.flowi4_oif = 0;
- fl4.flowi4_iif = net->loopback_dev->ifindex;
+ fl4.flowi4_iif = LOOPBACK_IFINDEX;
fl4.daddr = ip_hdr(skb)->saddr;
fl4.saddr = 0;
fl4.flowi4_tos = RT_TOS(ip_hdr(skb)->tos);