Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 340707
b: refs/heads/master
c: a4477c4
h: refs/heads/master
i:
  340705: cdbfaca
  340703: 480469b
v: v3
  • Loading branch information
Li RongQing authored and David S. Miller committed Nov 9, 2012
1 parent 7ef7d52 commit 548d12f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f1e0b5b4f1eae56a3192688177f36e2bdf0e01ac
refs/heads/master: a4477c4ddb5d3552b4d204f49047bdbb097c4450
1 change: 0 additions & 1 deletion trunk/include/net/ip6_fib.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ struct rt6_info {
struct rt6key rt6i_src;
struct rt6key rt6i_prefsrc;
u32 rt6i_metric;
u32 rt6i_peer_genid;

struct inet6_dev *rt6i_idev;
unsigned long _rt6i_peer;
Expand Down
18 changes: 2 additions & 16 deletions trunk/net/ipv6/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,13 +321,6 @@ static void ip6_dst_destroy(struct dst_entry *dst)
}
}

static atomic_t __rt6_peer_genid = ATOMIC_INIT(0);

static u32 rt6_peer_genid(void)
{
return atomic_read(&__rt6_peer_genid);
}

void rt6_bind_peer(struct rt6_info *rt, int create)
{
struct inet_peer_base *base;
Expand All @@ -341,8 +334,6 @@ void rt6_bind_peer(struct rt6_info *rt, int create)
if (peer) {
if (!rt6_set_peer(rt, peer))
inet_putpeer(peer);
else
rt->rt6i_peer_genid = rt6_peer_genid();
}
}

Expand Down Expand Up @@ -1099,14 +1090,9 @@ static struct dst_entry *ip6_dst_check(struct dst_entry *dst, u32 cookie)
if (rt->rt6i_genid != rt_genid(dev_net(rt->dst.dev)))
return NULL;

if (rt->rt6i_node && (rt->rt6i_node->fn_sernum == cookie)) {
if (rt->rt6i_peer_genid != rt6_peer_genid()) {
if (!rt6_has_peer(rt))
rt6_bind_peer(rt, 0);
rt->rt6i_peer_genid = rt6_peer_genid();
}
if (rt->rt6i_node && (rt->rt6i_node->fn_sernum == cookie))
return dst;
}

return NULL;
}

Expand Down

0 comments on commit 548d12f

Please sign in to comment.