Subject: [PATCH] IPv6 MIB:ipv6DefaultRouterTable

From: Shirley Ma <[email-masked]>
Date: Wed, 14 Jan 2004 16:22:09 -0800

This patch is agaist 2.6.1 kernel.

Thanks
Shirley Ma
IBM Linux Technology Center

diff -urN linux-2.6.1/include/linux/rtnetlink.h linux-2.6.1-ipv6mib7/include/linux/rtnetlink.h
--- linux-2.6.1/include/linux/rtnetlink.h	2004-01-08 22:59:55.000000000 -0800
+++ linux-2.6.1-ipv6mib7/include/linux/rtnetlink.h	2004-01-13 10:41:55.000000000 -0800
@@ -247,7 +247,7 @@
 {
 	__u32	rta_clntref;
 	__u32	rta_lastuse;
-	__s32	rta_expires;
+	__u32	rta_expires;	/* seconds */
 	__u32	rta_error;
 	__u32	rta_used;
 
diff -urN linux-2.6.1/net/ipv6/route.c linux-2.6.1-ipv6mib7/net/ipv6/route.c
--- linux-2.6.1/net/ipv6/route.c	2004-01-08 22:59:48.000000000 -0800
+++ linux-2.6.1-ipv6mib7/net/ipv6/route.c	2004-01-13 10:41:55.000000000 -0800
@@ -1535,8 +1535,8 @@
 		RTA_PUT(skb, RTA_OIF, sizeof(int), &rt->rt6i_dev->ifindex);
 	RTA_PUT(skb, RTA_PRIORITY, 4, &rt->rt6i_metric);
 	ci.rta_lastuse = jiffies_to_clock_t(jiffies - rt->u.dst.lastuse);
-	if (rt->rt6i_expires)
-		ci.rta_expires = jiffies_to_clock_t(rt->rt6i_expires - jiffies);
+	if (rt->rt6i_expires && time_after(rt->rt6i_expires, jiffies))
+		ci.rta_expires = (rt->rt6i_expires - jiffies)/HZ;
 	else
 		ci.rta_expires = 0;
 	ci.rta_used = rt->u.dst.__use;