diff options
author | Li Yewang <lyw@nanjing-fnst.com> | 2006-12-18 09:26:35 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-12-18 09:26:35 +0100 |
commit | 14fb8a764786e37ac26a2175638115f21980e5a3 (patch) | |
tree | eeb7d81d53a557ab827a735e8c6d6c5901633a0c | |
parent | [TCP]: Trivial fix to message in tcp_v4_inbound_md5_hash (diff) | |
download | linux-14fb8a764786e37ac26a2175638115f21980e5a3.tar.xz linux-14fb8a764786e37ac26a2175638115f21980e5a3.zip |
[IPV4]: Fix BUG of ip_rt_send_redirect()
Fix the redirect packet of the router if the jiffies wraparound.
Signed-off-by: Li Yewang <lyw@nanjing-fnst.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ipv4/route.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 1aaff0a2e098..2daa0dc19d33 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -1325,7 +1325,8 @@ void ip_rt_send_redirect(struct sk_buff *skb) /* Check for load limit; set rate_last to the latest sent * redirect. */ - if (time_after(jiffies, + if (rt->u.dst.rate_tokens == 0 || + time_after(jiffies, (rt->u.dst.rate_last + (ip_rt_redirect_load << rt->u.dst.rate_tokens)))) { icmp_send(skb, ICMP_REDIRECT, ICMP_REDIR_HOST, rt->rt_gateway); |