aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-05-03 22:45:15 -0400
committerDavid S. Miller <davem@davemloft.net>2011-05-03 22:45:15 -0400
commit475949d8e86bbde5ea3ffa4d95e022ca69233b14 (patch)
tree5e29156df321b617366921f64532fc353019b238 /net
parent417da66fa9d2f14b1a90b04095413b87907d8183 (diff)
ipv4: Renamt struct rtable's rt_tos to rt_key_tos.
To more accurately reflect that it is purely a routing cache lookup key and is used in no other context. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/route.c24
-rw-r--r--net/ipv4/xfrm4_policy.c2
2 files changed, 13 insertions, 13 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 64f360d853fb..3bc685454b5b 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -424,7 +424,7 @@ static int rt_cache_seq_show(struct seq_file *seq, void *v)
424 dst_metric(&r->dst, RTAX_WINDOW), 424 dst_metric(&r->dst, RTAX_WINDOW),
425 (int)((dst_metric(&r->dst, RTAX_RTT) >> 3) + 425 (int)((dst_metric(&r->dst, RTAX_RTT) >> 3) +
426 dst_metric(&r->dst, RTAX_RTTVAR)), 426 dst_metric(&r->dst, RTAX_RTTVAR)),
427 r->rt_tos, 427 r->rt_key_tos,
428 r->dst.hh ? atomic_read(&r->dst.hh->hh_refcnt) : -1, 428 r->dst.hh ? atomic_read(&r->dst.hh->hh_refcnt) : -1,
429 r->dst.hh ? (r->dst.hh->hh_output == 429 r->dst.hh ? (r->dst.hh->hh_output ==
430 dev_queue_xmit) : 0, 430 dev_queue_xmit) : 0,
@@ -724,7 +724,7 @@ static inline int compare_keys(struct rtable *rt1, struct rtable *rt2)
724 return (((__force u32)rt1->rt_key_dst ^ (__force u32)rt2->rt_key_dst) | 724 return (((__force u32)rt1->rt_key_dst ^ (__force u32)rt2->rt_key_dst) |
725 ((__force u32)rt1->rt_key_src ^ (__force u32)rt2->rt_key_src) | 725 ((__force u32)rt1->rt_key_src ^ (__force u32)rt2->rt_key_src) |
726 (rt1->rt_mark ^ rt2->rt_mark) | 726 (rt1->rt_mark ^ rt2->rt_mark) |
727 (rt1->rt_tos ^ rt2->rt_tos) | 727 (rt1->rt_key_tos ^ rt2->rt_key_tos) |
728 (rt1->rt_oif ^ rt2->rt_oif) | 728 (rt1->rt_oif ^ rt2->rt_oif) |
729 (rt1->rt_iif ^ rt2->rt_iif)) == 0; 729 (rt1->rt_iif ^ rt2->rt_iif)) == 0;
730} 730}
@@ -1349,7 +1349,7 @@ static struct dst_entry *ipv4_negative_advice(struct dst_entry *dst)
1349 rt_genid(dev_net(dst->dev))); 1349 rt_genid(dev_net(dst->dev)));
1350#if RT_CACHE_DEBUG >= 1 1350#if RT_CACHE_DEBUG >= 1
1351 printk(KERN_DEBUG "ipv4_negative_advice: redirect to %pI4/%02x dropped\n", 1351 printk(KERN_DEBUG "ipv4_negative_advice: redirect to %pI4/%02x dropped\n",
1352 &rt->rt_dst, rt->rt_tos); 1352 &rt->rt_dst, rt->rt_key_tos);
1353#endif 1353#endif
1354 rt_del(hash, rt); 1354 rt_del(hash, rt);
1355 ret = NULL; 1355 ret = NULL;
@@ -1710,7 +1710,7 @@ void ip_rt_get_source(u8 *addr, struct rtable *rt)
1710 struct flowi4 fl4 = { 1710 struct flowi4 fl4 = {
1711 .daddr = rt->rt_key_dst, 1711 .daddr = rt->rt_key_dst,
1712 .saddr = rt->rt_key_src, 1712 .saddr = rt->rt_key_src,
1713 .flowi4_tos = rt->rt_tos, 1713 .flowi4_tos = rt->rt_key_tos,
1714 .flowi4_oif = rt->rt_oif, 1714 .flowi4_oif = rt->rt_oif,
1715 .flowi4_iif = rt->rt_iif, 1715 .flowi4_iif = rt->rt_iif,
1716 .flowi4_mark = rt->rt_mark, 1716 .flowi4_mark = rt->rt_mark,
@@ -1886,7 +1886,7 @@ static int ip_route_input_mc(struct sk_buff *skb, __be32 daddr, __be32 saddr,
1886 rth->rt_genid = rt_genid(dev_net(dev)); 1886 rth->rt_genid = rt_genid(dev_net(dev));
1887 rth->rt_flags = RTCF_MULTICAST; 1887 rth->rt_flags = RTCF_MULTICAST;
1888 rth->rt_type = RTN_MULTICAST; 1888 rth->rt_type = RTN_MULTICAST;
1889 rth->rt_tos = tos; 1889 rth->rt_key_tos = tos;
1890 rth->rt_dst = daddr; 1890 rth->rt_dst = daddr;
1891 rth->rt_src = saddr; 1891 rth->rt_src = saddr;
1892 rth->rt_route_iif = dev->ifindex; 1892 rth->rt_route_iif = dev->ifindex;
@@ -2023,7 +2023,7 @@ static int __mkroute_input(struct sk_buff *skb,
2023 rth->rt_genid = rt_genid(dev_net(rth->dst.dev)); 2023 rth->rt_genid = rt_genid(dev_net(rth->dst.dev));
2024 rth->rt_flags = flags; 2024 rth->rt_flags = flags;
2025 rth->rt_type = res->type; 2025 rth->rt_type = res->type;
2026 rth->rt_tos = tos; 2026 rth->rt_key_tos = tos;
2027 rth->rt_dst = daddr; 2027 rth->rt_dst = daddr;
2028 rth->rt_src = saddr; 2028 rth->rt_src = saddr;
2029 rth->rt_route_iif = in_dev->dev->ifindex; 2029 rth->rt_route_iif = in_dev->dev->ifindex;
@@ -2203,7 +2203,7 @@ local_input:
2203 rth->rt_genid = rt_genid(net); 2203 rth->rt_genid = rt_genid(net);
2204 rth->rt_flags = flags|RTCF_LOCAL; 2204 rth->rt_flags = flags|RTCF_LOCAL;
2205 rth->rt_type = res.type; 2205 rth->rt_type = res.type;
2206 rth->rt_tos = tos; 2206 rth->rt_key_tos = tos;
2207 rth->rt_dst = daddr; 2207 rth->rt_dst = daddr;
2208 rth->rt_src = saddr; 2208 rth->rt_src = saddr;
2209#ifdef CONFIG_IP_ROUTE_CLASSID 2209#ifdef CONFIG_IP_ROUTE_CLASSID
@@ -2293,7 +2293,7 @@ int ip_route_input_common(struct sk_buff *skb, __be32 daddr, __be32 saddr,
2293 ((__force u32)rth->rt_key_src ^ (__force u32)saddr) | 2293 ((__force u32)rth->rt_key_src ^ (__force u32)saddr) |
2294 (rth->rt_iif ^ iif) | 2294 (rth->rt_iif ^ iif) |
2295 rth->rt_oif | 2295 rth->rt_oif |
2296 (rth->rt_tos ^ tos)) == 0 && 2296 (rth->rt_key_tos ^ tos)) == 0 &&
2297 rth->rt_mark == skb->mark && 2297 rth->rt_mark == skb->mark &&
2298 net_eq(dev_net(rth->dst.dev), net) && 2298 net_eq(dev_net(rth->dst.dev), net) &&
2299 !rt_is_expired(rth)) { 2299 !rt_is_expired(rth)) {
@@ -2410,7 +2410,7 @@ static struct rtable *__mkroute_output(const struct fib_result *res,
2410 rth->rt_genid = rt_genid(dev_net(dev_out)); 2410 rth->rt_genid = rt_genid(dev_net(dev_out));
2411 rth->rt_flags = flags; 2411 rth->rt_flags = flags;
2412 rth->rt_type = type; 2412 rth->rt_type = type;
2413 rth->rt_tos = tos; 2413 rth->rt_key_tos = tos;
2414 rth->rt_dst = fl4->daddr; 2414 rth->rt_dst = fl4->daddr;
2415 rth->rt_src = fl4->saddr; 2415 rth->rt_src = fl4->saddr;
2416 rth->rt_route_iif = 0; 2416 rth->rt_route_iif = 0;
@@ -2668,7 +2668,7 @@ struct rtable *__ip_route_output_key(struct net *net, struct flowi4 *flp4)
2668 rt_is_output_route(rth) && 2668 rt_is_output_route(rth) &&
2669 rth->rt_oif == flp4->flowi4_oif && 2669 rth->rt_oif == flp4->flowi4_oif &&
2670 rth->rt_mark == flp4->flowi4_mark && 2670 rth->rt_mark == flp4->flowi4_mark &&
2671 !((rth->rt_tos ^ flp4->flowi4_tos) & 2671 !((rth->rt_key_tos ^ flp4->flowi4_tos) &
2672 (IPTOS_RT_MASK | RTO_ONLINK)) && 2672 (IPTOS_RT_MASK | RTO_ONLINK)) &&
2673 net_eq(dev_net(rth->dst.dev), net) && 2673 net_eq(dev_net(rth->dst.dev), net) &&
2674 !rt_is_expired(rth)) { 2674 !rt_is_expired(rth)) {
@@ -2740,7 +2740,7 @@ struct dst_entry *ipv4_blackhole_route(struct net *net, struct dst_entry *dst_or
2740 2740
2741 rt->rt_key_dst = ort->rt_key_dst; 2741 rt->rt_key_dst = ort->rt_key_dst;
2742 rt->rt_key_src = ort->rt_key_src; 2742 rt->rt_key_src = ort->rt_key_src;
2743 rt->rt_tos = ort->rt_tos; 2743 rt->rt_key_tos = ort->rt_key_tos;
2744 rt->rt_route_iif = ort->rt_route_iif; 2744 rt->rt_route_iif = ort->rt_route_iif;
2745 rt->rt_iif = ort->rt_iif; 2745 rt->rt_iif = ort->rt_iif;
2746 rt->rt_oif = ort->rt_oif; 2746 rt->rt_oif = ort->rt_oif;
@@ -2803,7 +2803,7 @@ static int rt_fill_info(struct net *net,
2803 r->rtm_family = AF_INET; 2803 r->rtm_family = AF_INET;
2804 r->rtm_dst_len = 32; 2804 r->rtm_dst_len = 32;
2805 r->rtm_src_len = 0; 2805 r->rtm_src_len = 0;
2806 r->rtm_tos = rt->rt_tos; 2806 r->rtm_tos = rt->rt_key_tos;
2807 r->rtm_table = RT_TABLE_MAIN; 2807 r->rtm_table = RT_TABLE_MAIN;
2808 NLA_PUT_U32(skb, RTA_TABLE, RT_TABLE_MAIN); 2808 NLA_PUT_U32(skb, RTA_TABLE, RT_TABLE_MAIN);
2809 r->rtm_type = rt->rt_type; 2809 r->rtm_type = rt->rt_type;
diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c
index 59b1340fb3bf..7ff973bd02dd 100644
--- a/net/ipv4/xfrm4_policy.c
+++ b/net/ipv4/xfrm4_policy.c
@@ -73,7 +73,7 @@ static int xfrm4_fill_dst(struct xfrm_dst *xdst, struct net_device *dev,
73 73
74 rt->rt_key_dst = fl4->daddr; 74 rt->rt_key_dst = fl4->daddr;
75 rt->rt_key_src = fl4->saddr; 75 rt->rt_key_src = fl4->saddr;
76 rt->rt_tos = fl4->flowi4_tos; 76 rt->rt_key_tos = fl4->flowi4_tos;
77 rt->rt_route_iif = fl4->flowi4_iif; 77 rt->rt_route_iif = fl4->flowi4_iif;
78 rt->rt_iif = fl4->flowi4_iif; 78 rt->rt_iif = fl4->flowi4_iif;
79 rt->rt_oif = fl4->flowi4_oif; 79 rt->rt_oif = fl4->flowi4_oif;