diff options
author | David S. Miller <davem@davemloft.net> | 2012-07-17 17:39:44 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-20 16:38:34 -0400 |
commit | 4fd551d7bed93af60af61c5a324b8f5dff37953a (patch) | |
tree | 2cc151b3dc88793340c50421799627b06b766a43 /net/ipv4 | |
parent | 93ac53410a82a4f1bf2baf9d65d95cc29f2774ca (diff) |
ipv4: Kill rt->rt_oif
Never actually used.
It was being set on output routes to the original OIF specified in the
flow key used for the lookup.
Adjust the only user, ipmr_rt_fib_lookup(), for greater correctness of
the flowi4_oif and flowi4_iif values, thanks to feedback from Julian
Anastasov.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/ipmr.c | 7 | ||||
-rw-r--r-- | net/ipv4/route.c | 5 | ||||
-rw-r--r-- | net/ipv4/xfrm4_policy.c | 1 |
3 files changed, 5 insertions, 8 deletions
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index eee3bf6676fe..8eec8f4a0536 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c | |||
@@ -1795,8 +1795,11 @@ static struct mr_table *ipmr_rt_fib_lookup(struct net *net, struct sk_buff *skb) | |||
1795 | .daddr = iph->daddr, | 1795 | .daddr = iph->daddr, |
1796 | .saddr = iph->saddr, | 1796 | .saddr = iph->saddr, |
1797 | .flowi4_tos = RT_TOS(iph->tos), | 1797 | .flowi4_tos = RT_TOS(iph->tos), |
1798 | .flowi4_oif = rt->rt_oif, | 1798 | .flowi4_oif = (rt_is_output_route(rt) ? |
1799 | .flowi4_iif = rt->rt_iif, | 1799 | skb->dev->ifindex : 0), |
1800 | .flowi4_iif = (rt_is_output_route(rt) ? | ||
1801 | net->loopback_dev->ifindex : | ||
1802 | skb->dev->ifindex), | ||
1800 | .flowi4_mark = skb->mark, | 1803 | .flowi4_mark = skb->mark, |
1801 | }; | 1804 | }; |
1802 | struct mr_table *mrt; | 1805 | struct mr_table *mrt; |
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index b8707779b85d..a280b6ac8eb2 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -1332,7 +1332,6 @@ static int ip_route_input_mc(struct sk_buff *skb, __be32 daddr, __be32 saddr, | |||
1332 | rth->rt_type = RTN_MULTICAST; | 1332 | rth->rt_type = RTN_MULTICAST; |
1333 | rth->rt_route_iif = dev->ifindex; | 1333 | rth->rt_route_iif = dev->ifindex; |
1334 | rth->rt_iif = dev->ifindex; | 1334 | rth->rt_iif = dev->ifindex; |
1335 | rth->rt_oif = 0; | ||
1336 | rth->rt_pmtu = 0; | 1335 | rth->rt_pmtu = 0; |
1337 | rth->rt_gateway = 0; | 1336 | rth->rt_gateway = 0; |
1338 | rth->fi = NULL; | 1337 | rth->fi = NULL; |
@@ -1463,7 +1462,6 @@ static int __mkroute_input(struct sk_buff *skb, | |||
1463 | rth->rt_type = res->type; | 1462 | rth->rt_type = res->type; |
1464 | rth->rt_route_iif = in_dev->dev->ifindex; | 1463 | rth->rt_route_iif = in_dev->dev->ifindex; |
1465 | rth->rt_iif = in_dev->dev->ifindex; | 1464 | rth->rt_iif = in_dev->dev->ifindex; |
1466 | rth->rt_oif = 0; | ||
1467 | rth->rt_pmtu = 0; | 1465 | rth->rt_pmtu = 0; |
1468 | rth->rt_gateway = 0; | 1466 | rth->rt_gateway = 0; |
1469 | rth->fi = NULL; | 1467 | rth->fi = NULL; |
@@ -1642,7 +1640,6 @@ local_input: | |||
1642 | rth->rt_type = res.type; | 1640 | rth->rt_type = res.type; |
1643 | rth->rt_route_iif = dev->ifindex; | 1641 | rth->rt_route_iif = dev->ifindex; |
1644 | rth->rt_iif = dev->ifindex; | 1642 | rth->rt_iif = dev->ifindex; |
1645 | rth->rt_oif = 0; | ||
1646 | rth->rt_pmtu = 0; | 1643 | rth->rt_pmtu = 0; |
1647 | rth->rt_gateway = 0; | 1644 | rth->rt_gateway = 0; |
1648 | rth->fi = NULL; | 1645 | rth->fi = NULL; |
@@ -1808,7 +1805,6 @@ static struct rtable *__mkroute_output(const struct fib_result *res, | |||
1808 | rth->rt_type = type; | 1805 | rth->rt_type = type; |
1809 | rth->rt_route_iif = 0; | 1806 | rth->rt_route_iif = 0; |
1810 | rth->rt_iif = orig_oif ? : dev_out->ifindex; | 1807 | rth->rt_iif = orig_oif ? : dev_out->ifindex; |
1811 | rth->rt_oif = orig_oif; | ||
1812 | rth->rt_pmtu = 0; | 1808 | rth->rt_pmtu = 0; |
1813 | rth->rt_gateway = 0; | 1809 | rth->rt_gateway = 0; |
1814 | rth->fi = NULL; | 1810 | rth->fi = NULL; |
@@ -2085,7 +2081,6 @@ struct dst_entry *ipv4_blackhole_route(struct net *net, struct dst_entry *dst_or | |||
2085 | 2081 | ||
2086 | rt->rt_route_iif = ort->rt_route_iif; | 2082 | rt->rt_route_iif = ort->rt_route_iif; |
2087 | rt->rt_iif = ort->rt_iif; | 2083 | rt->rt_iif = ort->rt_iif; |
2088 | rt->rt_oif = ort->rt_oif; | ||
2089 | rt->rt_pmtu = ort->rt_pmtu; | 2084 | rt->rt_pmtu = ort->rt_pmtu; |
2090 | 2085 | ||
2091 | rt->rt_genid = rt_genid(net); | 2086 | rt->rt_genid = rt_genid(net); |
diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c index 6074b694f118..3c99b4cdd290 100644 --- a/net/ipv4/xfrm4_policy.c +++ b/net/ipv4/xfrm4_policy.c | |||
@@ -81,7 +81,6 @@ static int xfrm4_fill_dst(struct xfrm_dst *xdst, struct net_device *dev, | |||
81 | 81 | ||
82 | xdst->u.rt.rt_route_iif = fl4->flowi4_iif; | 82 | xdst->u.rt.rt_route_iif = fl4->flowi4_iif; |
83 | xdst->u.rt.rt_iif = fl4->flowi4_iif; | 83 | xdst->u.rt.rt_iif = fl4->flowi4_iif; |
84 | xdst->u.rt.rt_oif = fl4->flowi4_oif; | ||
85 | 84 | ||
86 | xdst->u.dst.dev = dev; | 85 | xdst->u.dst.dev = dev; |
87 | dev_hold(dev); | 86 | dev_hold(dev); |