diff options
author | David S. Miller <davem@davemloft.net> | 2012-07-17 17:44:26 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-20 16:40:02 -0400 |
commit | 9917e1e8762745191eba5a3bf2040278cbddbee1 (patch) | |
tree | 9c538b6598b005e91b08b37e91dcb6638c26c4a0 /net/ipv4 | |
parent | 4fd551d7bed93af60af61c5a324b8f5dff37953a (diff) |
ipv4: Turn rt->rt_route_iif into rt->rt_is_input.
That is this value's only use, as a boolean to indicate whether
a route is an input route or not.
So implement it that way, using a u16 gap present in the struct
already.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/route.c | 10 | ||||
-rw-r--r-- | net/ipv4/xfrm4_policy.c | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index a280b6ac8eb2..fac4c4acdbac 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -1330,7 +1330,7 @@ static int ip_route_input_mc(struct sk_buff *skb, __be32 daddr, __be32 saddr, | |||
1330 | rth->rt_genid = rt_genid(dev_net(dev)); | 1330 | rth->rt_genid = rt_genid(dev_net(dev)); |
1331 | rth->rt_flags = RTCF_MULTICAST; | 1331 | rth->rt_flags = RTCF_MULTICAST; |
1332 | rth->rt_type = RTN_MULTICAST; | 1332 | rth->rt_type = RTN_MULTICAST; |
1333 | rth->rt_route_iif = dev->ifindex; | 1333 | rth->rt_is_input= 1; |
1334 | rth->rt_iif = dev->ifindex; | 1334 | rth->rt_iif = dev->ifindex; |
1335 | rth->rt_pmtu = 0; | 1335 | rth->rt_pmtu = 0; |
1336 | rth->rt_gateway = 0; | 1336 | rth->rt_gateway = 0; |
@@ -1460,7 +1460,7 @@ static int __mkroute_input(struct sk_buff *skb, | |||
1460 | rth->rt_genid = rt_genid(dev_net(rth->dst.dev)); | 1460 | rth->rt_genid = rt_genid(dev_net(rth->dst.dev)); |
1461 | rth->rt_flags = flags; | 1461 | rth->rt_flags = flags; |
1462 | rth->rt_type = res->type; | 1462 | rth->rt_type = res->type; |
1463 | rth->rt_route_iif = in_dev->dev->ifindex; | 1463 | rth->rt_is_input = 1; |
1464 | rth->rt_iif = in_dev->dev->ifindex; | 1464 | rth->rt_iif = in_dev->dev->ifindex; |
1465 | rth->rt_pmtu = 0; | 1465 | rth->rt_pmtu = 0; |
1466 | rth->rt_gateway = 0; | 1466 | rth->rt_gateway = 0; |
@@ -1638,7 +1638,7 @@ local_input: | |||
1638 | rth->rt_genid = rt_genid(net); | 1638 | rth->rt_genid = rt_genid(net); |
1639 | rth->rt_flags = flags|RTCF_LOCAL; | 1639 | rth->rt_flags = flags|RTCF_LOCAL; |
1640 | rth->rt_type = res.type; | 1640 | rth->rt_type = res.type; |
1641 | rth->rt_route_iif = dev->ifindex; | 1641 | rth->rt_is_input = 1; |
1642 | rth->rt_iif = dev->ifindex; | 1642 | rth->rt_iif = dev->ifindex; |
1643 | rth->rt_pmtu = 0; | 1643 | rth->rt_pmtu = 0; |
1644 | rth->rt_gateway = 0; | 1644 | rth->rt_gateway = 0; |
@@ -1803,7 +1803,7 @@ static struct rtable *__mkroute_output(const struct fib_result *res, | |||
1803 | rth->rt_genid = rt_genid(dev_net(dev_out)); | 1803 | rth->rt_genid = rt_genid(dev_net(dev_out)); |
1804 | rth->rt_flags = flags; | 1804 | rth->rt_flags = flags; |
1805 | rth->rt_type = type; | 1805 | rth->rt_type = type; |
1806 | rth->rt_route_iif = 0; | 1806 | rth->rt_is_input = 0; |
1807 | rth->rt_iif = orig_oif ? : dev_out->ifindex; | 1807 | rth->rt_iif = orig_oif ? : dev_out->ifindex; |
1808 | rth->rt_pmtu = 0; | 1808 | rth->rt_pmtu = 0; |
1809 | rth->rt_gateway = 0; | 1809 | rth->rt_gateway = 0; |
@@ -2079,7 +2079,7 @@ struct dst_entry *ipv4_blackhole_route(struct net *net, struct dst_entry *dst_or | |||
2079 | if (new->dev) | 2079 | if (new->dev) |
2080 | dev_hold(new->dev); | 2080 | dev_hold(new->dev); |
2081 | 2081 | ||
2082 | rt->rt_route_iif = ort->rt_route_iif; | 2082 | rt->rt_is_input = ort->rt_is_input; |
2083 | rt->rt_iif = ort->rt_iif; | 2083 | rt->rt_iif = ort->rt_iif; |
2084 | rt->rt_pmtu = ort->rt_pmtu; | 2084 | rt->rt_pmtu = ort->rt_pmtu; |
2085 | 2085 | ||
diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c index 3c99b4cdd290..c6281847f16a 100644 --- a/net/ipv4/xfrm4_policy.c +++ b/net/ipv4/xfrm4_policy.c | |||
@@ -79,7 +79,6 @@ static int xfrm4_fill_dst(struct xfrm_dst *xdst, struct net_device *dev, | |||
79 | struct rtable *rt = (struct rtable *)xdst->route; | 79 | struct rtable *rt = (struct rtable *)xdst->route; |
80 | const struct flowi4 *fl4 = &fl->u.ip4; | 80 | const struct flowi4 *fl4 = &fl->u.ip4; |
81 | 81 | ||
82 | xdst->u.rt.rt_route_iif = fl4->flowi4_iif; | ||
83 | xdst->u.rt.rt_iif = fl4->flowi4_iif; | 82 | xdst->u.rt.rt_iif = fl4->flowi4_iif; |
84 | 83 | ||
85 | xdst->u.dst.dev = dev; | 84 | xdst->u.dst.dev = dev; |
@@ -87,6 +86,7 @@ static int xfrm4_fill_dst(struct xfrm_dst *xdst, struct net_device *dev, | |||
87 | 86 | ||
88 | /* Sheit... I remember I did this right. Apparently, | 87 | /* Sheit... I remember I did this right. Apparently, |
89 | * it was magically lost, so this code needs audit */ | 88 | * it was magically lost, so this code needs audit */ |
89 | xdst->u.rt.rt_is_input = rt->rt_is_input; | ||
90 | xdst->u.rt.rt_flags = rt->rt_flags & (RTCF_BROADCAST | RTCF_MULTICAST | | 90 | xdst->u.rt.rt_flags = rt->rt_flags & (RTCF_BROADCAST | RTCF_MULTICAST | |
91 | RTCF_LOCAL); | 91 | RTCF_LOCAL); |
92 | xdst->u.rt.rt_type = rt->rt_type; | 92 | xdst->u.rt.rt_type = rt->rt_type; |