Skip to content

Commit

Permalink
ipv6: Don't drop cache route entry unless timer actually expired.
Browse files Browse the repository at this point in the history
This is ipv6 variant of the commit 5e016cb.. ("ipv4: Don't drop
redirected route cache entry unless PTMU actually expired")
by Guenter Roeck <guenter.roeck@ericsson.com>.

Remove cache route entry in ipv6_negative_advice() only if
the timer is expired.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
yoshfuji authored and davem330 committed Mar 29, 2010
1 parent 7855f76 commit 54c1a85
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions net/ipv6/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -890,12 +890,17 @@ static struct dst_entry *ip6_negative_advice(struct dst_entry *dst)
struct rt6_info *rt = (struct rt6_info *) dst;

if (rt) {
if (rt->rt6i_flags & RTF_CACHE)
ip6_del_rt(rt);
else
if (rt->rt6i_flags & RTF_CACHE) {
if (rt6_check_expired(rt)) {
ip6_del_rt(rt);
dst = NULL;
}
} else {
dst_release(dst);
dst = NULL;
}
}
return NULL;
return dst;
}

static void ip6_link_failure(struct sk_buff *skb)
Expand Down

0 comments on commit 54c1a85

Please sign in to comment.