Netdev List
 help / color / mirror / Atom feed
* [PATCH]:Replacing with time_before in net/ipv4/ip_gre.c
@ 2007-04-25  6:00 Shani Moideen
  0 siblings, 0 replies; only message in thread
From: Shani Moideen @ 2007-04-25  6:00 UTC (permalink / raw)
  To: davem, kuznet, pekkas, jmorris, yoshfuji, kaber; +Cc: kernel-janitors, netdev

Hi,

Replacing with time_before in net/ipv4/ip_gre.c

thanks.

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

diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 9151da6..05cd63b 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -28,6 +28,7 @@
 #include <linux/igmp.h>
 #include <linux/netfilter_ipv4.h>
 #include <linux/if_ether.h>
+#include <linux/jiffies.h>
 
 #include <net/sock.h>
 #include <net/ip.h>
@@ -376,7 +377,7 @@ static void ipgre_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;
@@ -801,7 +802,7 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
 #endif
 
 	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);

----
Shani


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2007-04-25  6:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-25  6:00 [PATCH]:Replacing with time_before in net/ipv4/ip_gre.c Shani Moideen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox