aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/decnet/dn_route.c6
-rw-r--r--net/ipv4/fib_frontend.c2
-rw-r--r--net/ipv4/ipmr.c2
-rw-r--r--net/ipv4/netfilter/ipt_rpfilter.c2
-rw-r--r--net/ipv4/route.c6
-rw-r--r--net/ipv6/route.c2
6 files changed, 10 insertions, 10 deletions
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c
index 85a3604c87c8..c855e8d0738f 100644
--- a/net/decnet/dn_route.c
+++ b/net/decnet/dn_route.c
@@ -961,7 +961,7 @@ static int dn_route_output_slow(struct dst_entry **pprt, const struct flowidn *o
961 .saddr = oldflp->saddr, 961 .saddr = oldflp->saddr,
962 .flowidn_scope = RT_SCOPE_UNIVERSE, 962 .flowidn_scope = RT_SCOPE_UNIVERSE,
963 .flowidn_mark = oldflp->flowidn_mark, 963 .flowidn_mark = oldflp->flowidn_mark,
964 .flowidn_iif = init_net.loopback_dev->ifindex, 964 .flowidn_iif = LOOPBACK_IFINDEX,
965 .flowidn_oif = oldflp->flowidn_oif, 965 .flowidn_oif = oldflp->flowidn_oif,
966 }; 966 };
967 struct dn_route *rt = NULL; 967 struct dn_route *rt = NULL;
@@ -979,7 +979,7 @@ static int dn_route_output_slow(struct dst_entry **pprt, const struct flowidn *o
979 "dn_route_output_slow: dst=%04x src=%04x mark=%d" 979 "dn_route_output_slow: dst=%04x src=%04x mark=%d"
980 " iif=%d oif=%d\n", le16_to_cpu(oldflp->daddr), 980 " iif=%d oif=%d\n", le16_to_cpu(oldflp->daddr),
981 le16_to_cpu(oldflp->saddr), 981 le16_to_cpu(oldflp->saddr),
982 oldflp->flowidn_mark, init_net.loopback_dev->ifindex, 982 oldflp->flowidn_mark, LOOPBACK_IFINDEX,
983 oldflp->flowidn_oif); 983 oldflp->flowidn_oif);
984 984
985 /* If we have an output interface, verify its a DECnet device */ 985 /* If we have an output interface, verify its a DECnet device */
@@ -1042,7 +1042,7 @@ source_ok:
1042 if (!fld.daddr) 1042 if (!fld.daddr)
1043 goto out; 1043 goto out;
1044 } 1044 }
1045 fld.flowidn_oif = init_net.loopback_dev->ifindex; 1045 fld.flowidn_oif = LOOPBACK_IFINDEX;
1046 res.type = RTN_LOCAL; 1046 res.type = RTN_LOCAL;
1047 goto make_route; 1047 goto make_route;
1048 } 1048 }
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)
218 scope = RT_SCOPE_UNIVERSE; 218 scope = RT_SCOPE_UNIVERSE;
219 if (!ipv4_is_zeronet(ip_hdr(skb)->saddr)) { 219 if (!ipv4_is_zeronet(ip_hdr(skb)->saddr)) {
220 fl4.flowi4_oif = 0; 220 fl4.flowi4_oif = 0;
221 fl4.flowi4_iif = net->loopback_dev->ifindex; 221 fl4.flowi4_iif = LOOPBACK_IFINDEX;
222 fl4.daddr = ip_hdr(skb)->saddr; 222 fl4.daddr = ip_hdr(skb)->saddr;
223 fl4.saddr = 0; 223 fl4.saddr = 0;
224 fl4.flowi4_tos = RT_TOS(ip_hdr(skb)->tos); 224 fl4.flowi4_tos = RT_TOS(ip_hdr(skb)->tos);
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 };
diff --git a/net/ipv4/netfilter/ipt_rpfilter.c b/net/ipv4/netfilter/ipt_rpfilter.c
index 31371be8174b..c30130062cd6 100644
--- a/net/ipv4/netfilter/ipt_rpfilter.c
+++ b/net/ipv4/netfilter/ipt_rpfilter.c
@@ -85,7 +85,7 @@ static bool rpfilter_mt(const struct sk_buff *skb, struct xt_action_param *par)
85 return ipv4_is_local_multicast(iph->daddr) ^ invert; 85 return ipv4_is_local_multicast(iph->daddr) ^ invert;
86 flow.flowi4_iif = 0; 86 flow.flowi4_iif = 0;
87 } else { 87 } else {
88 flow.flowi4_iif = dev_net(par->in)->loopback_dev->ifindex; 88 flow.flowi4_iif = LOOPBACK_IFINDEX;
89 } 89 }
90 90
91 flow.daddr = iph->saddr; 91 flow.daddr = iph->saddr;
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 21ad369014c0..c58137391a3d 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1619,7 +1619,7 @@ static int ip_route_input_slow(struct sk_buff *skb, __be32 daddr, __be32 saddr,
1619 1619
1620 if (res.type == RTN_LOCAL) { 1620 if (res.type == RTN_LOCAL) {
1621 err = fib_validate_source(skb, saddr, daddr, tos, 1621 err = fib_validate_source(skb, saddr, daddr, tos,
1622 net->loopback_dev->ifindex, 1622 LOOPBACK_IFINDEX,
1623 dev, in_dev, &itag); 1623 dev, in_dev, &itag);
1624 if (err < 0) 1624 if (err < 0)
1625 goto martian_source_keep_err; 1625 goto martian_source_keep_err;
@@ -1895,7 +1895,7 @@ struct rtable *__ip_route_output_key(struct net *net, struct flowi4 *fl4)
1895 1895
1896 orig_oif = fl4->flowi4_oif; 1896 orig_oif = fl4->flowi4_oif;
1897 1897
1898 fl4->flowi4_iif = net->loopback_dev->ifindex; 1898 fl4->flowi4_iif = LOOPBACK_IFINDEX;
1899 fl4->flowi4_tos = tos & IPTOS_RT_MASK; 1899 fl4->flowi4_tos = tos & IPTOS_RT_MASK;
1900 fl4->flowi4_scope = ((tos & RTO_ONLINK) ? 1900 fl4->flowi4_scope = ((tos & RTO_ONLINK) ?
1901 RT_SCOPE_LINK : RT_SCOPE_UNIVERSE); 1901 RT_SCOPE_LINK : RT_SCOPE_UNIVERSE);
@@ -1984,7 +1984,7 @@ struct rtable *__ip_route_output_key(struct net *net, struct flowi4 *fl4)
1984 if (!fl4->daddr) 1984 if (!fl4->daddr)
1985 fl4->daddr = fl4->saddr = htonl(INADDR_LOOPBACK); 1985 fl4->daddr = fl4->saddr = htonl(INADDR_LOOPBACK);
1986 dev_out = net->loopback_dev; 1986 dev_out = net->loopback_dev;
1987 fl4->flowi4_oif = net->loopback_dev->ifindex; 1987 fl4->flowi4_oif = LOOPBACK_IFINDEX;
1988 res.type = RTN_LOCAL; 1988 res.type = RTN_LOCAL;
1989 flags |= RTCF_LOCAL; 1989 flags |= RTCF_LOCAL;
1990 goto make_route; 1990 goto make_route;
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 8e80fd279100..0ddf2d132e7f 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,
965{ 965{
966 int flags = 0; 966 int flags = 0;
967 967
968 fl6->flowi6_iif = net->loopback_dev->ifindex; 968 fl6->flowi6_iif = LOOPBACK_IFINDEX;
969 969
970 if ((sk && sk->sk_bound_dev_if) || rt6_need_strict(&fl6->daddr)) 970 if ((sk && sk->sk_bound_dev_if) || rt6_need_strict(&fl6->daddr))
971 flags |= RT6_LOOKUP_F_IFACE; 971 flags |= RT6_LOOKUP_F_IFACE;