netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH]:Replace with time_before in net/ipv4/ipip.c
@ 2007-04-25  6:00 Shani Moideen
  2007-04-25  8:19 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Shani Moideen @ 2007-04-25  6:00 UTC (permalink / raw)
  To: davem, kuznet, pekkas, jmorris, yoshfuji, kaber; +Cc: netdev, kernel-janitors

Hi,

Replacing (jiffies - errtime < TIMEOUT) with time_before in net/ipv4/ipip.c

thanks.

Signed-off-by: Shani Moideen <shani.moideen@wipro.com>
----


diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c
index 3ec5ce0..d2bc835 100644
--- a/net/ipv4/ipip.c
+++ b/net/ipv4/ipip.c
@@ -108,6 +108,7 @@
 #include <linux/init.h>
 #include <linux/netfilter_ipv4.h>
 #include <linux/if_ether.h>
+#include <linux/jiffies.h>
 
 #include <net/sock.h>
 #include <net/ip.h>
@@ -324,7 +325,7 @@ static int ipip_err(struct sk_buff *skb, u32 info)
 	if (t->parms.iph.ttl == 0 && type == ICMP_TIME_EXCEEDED)
 		goto out;
 
-	if (jiffies - t->err_time < IPTUNNEL_ERR_TIMEO)
+	if (time_before(jiffies , t->err_time + IPTUNNEL_ERR_TIMEO))
 		t->err_count++;
 	else
 		t->err_count = 1;
@@ -590,7 +591,7 @@ static int ipip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
 	}
 
 	if (tunnel->err_count > 0) {
-		if (jiffies - tunnel->err_time < IPTUNNEL_ERR_TIMEO) {
+		if (time_before(jiffies , tunnel->err_time + IPTUNNEL_ERR_TIMEO)) {
 			tunnel->err_count--;
 			dst_link_failure(skb);
 		} else

-- 
Shani 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-04-25  8:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-25  6:00 [PATCH]:Replace with time_before in net/ipv4/ipip.c Shani Moideen
2007-04-25  8:19 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).