diff options
author | Li RongQing <roy.qing.li@gmail.com> | 2012-11-07 16:56:33 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-11-08 21:16:08 -0500 |
commit | a4477c4ddb5d3552b4d204f49047bdbb097c4450 (patch) | |
tree | 0506bf5d24cc197cb43e3cab8109171e655d4196 /net/ipv6/route.c | |
parent | f1e0b5b4f1eae56a3192688177f36e2bdf0e01ac (diff) |
ipv6: remove rt6i_peer_genid from rt6_info and its handler
6431cbc25f(Create a mechanism for upward inetpeer propagation into routes)
introduces these codes, but this mechanism is never enabled since
rt6i_peer_genid always is zero whether it is not assigned or assigned by
rt6_peer_genid(). After 5943634fc5 (ipv4: Maintain redirect and PMTU info
in struct rtable again), the ipv4 related codes of this mechanism has been
removed, I think we maybe able to remove them now.
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/route.c')
-rw-r--r-- | net/ipv6/route.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index c1cfcb7e5632..6863f8b43bbd 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -321,13 +321,6 @@ static void ip6_dst_destroy(struct dst_entry *dst) | |||
321 | } | 321 | } |
322 | } | 322 | } |
323 | 323 | ||
324 | static atomic_t __rt6_peer_genid = ATOMIC_INIT(0); | ||
325 | |||
326 | static u32 rt6_peer_genid(void) | ||
327 | { | ||
328 | return atomic_read(&__rt6_peer_genid); | ||
329 | } | ||
330 | |||
331 | void rt6_bind_peer(struct rt6_info *rt, int create) | 324 | void rt6_bind_peer(struct rt6_info *rt, int create) |
332 | { | 325 | { |
333 | struct inet_peer_base *base; | 326 | struct inet_peer_base *base; |
@@ -341,8 +334,6 @@ void rt6_bind_peer(struct rt6_info *rt, int create) | |||
341 | if (peer) { | 334 | if (peer) { |
342 | if (!rt6_set_peer(rt, peer)) | 335 | if (!rt6_set_peer(rt, peer)) |
343 | inet_putpeer(peer); | 336 | inet_putpeer(peer); |
344 | else | ||
345 | rt->rt6i_peer_genid = rt6_peer_genid(); | ||
346 | } | 337 | } |
347 | } | 338 | } |
348 | 339 | ||
@@ -1099,14 +1090,9 @@ static struct dst_entry *ip6_dst_check(struct dst_entry *dst, u32 cookie) | |||
1099 | if (rt->rt6i_genid != rt_genid(dev_net(rt->dst.dev))) | 1090 | if (rt->rt6i_genid != rt_genid(dev_net(rt->dst.dev))) |
1100 | return NULL; | 1091 | return NULL; |
1101 | 1092 | ||
1102 | if (rt->rt6i_node && (rt->rt6i_node->fn_sernum == cookie)) { | 1093 | if (rt->rt6i_node && (rt->rt6i_node->fn_sernum == cookie)) |
1103 | if (rt->rt6i_peer_genid != rt6_peer_genid()) { | ||
1104 | if (!rt6_has_peer(rt)) | ||
1105 | rt6_bind_peer(rt, 0); | ||
1106 | rt->rt6i_peer_genid = rt6_peer_genid(); | ||
1107 | } | ||
1108 | return dst; | 1094 | return dst; |
1109 | } | 1095 | |
1110 | return NULL; | 1096 | return NULL; |
1111 | } | 1097 | } |
1112 | 1098 | ||