diff options
author | Pavel Emelyanov <xemul@parallels.com> | 2012-08-08 17:53:36 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-08-09 19:18:07 -0400 |
commit | 1fb9489bf190ce2b3fc03891f3de4b2d30600e28 (patch) | |
tree | da4e17036949e72ae0b1f0fc3b6b31557de18353 /net/ipv4/ipmr.c | |
parent | aa79e66eee5d525e2fcbd2a5fcb87ae3dd4aa9e9 (diff) |
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/ipv4/ipmr.c')
-rw-r--r-- | net/ipv4/ipmr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index 8eec8f4a0536..3a57570c8ee5 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c | |||
@@ -1798,7 +1798,7 @@ static struct mr_table *ipmr_rt_fib_lookup(struct net *net, struct sk_buff *skb) | |||
1798 | .flowi4_oif = (rt_is_output_route(rt) ? | 1798 | .flowi4_oif = (rt_is_output_route(rt) ? |
1799 | skb->dev->ifindex : 0), | 1799 | skb->dev->ifindex : 0), |
1800 | .flowi4_iif = (rt_is_output_route(rt) ? | 1800 | .flowi4_iif = (rt_is_output_route(rt) ? |
1801 | net->loopback_dev->ifindex : | 1801 | LOOPBACK_IFINDEX : |
1802 | skb->dev->ifindex), | 1802 | skb->dev->ifindex), |
1803 | .flowi4_mark = skb->mark, | 1803 | .flowi4_mark = skb->mark, |
1804 | }; | 1804 | }; |