Thread (8 messages) flat view 8 messages, 3 authors, 2012-07-19

Re: [PATCH 09/15] ipv4: Cache output routes in fib_info nexthops.

From: Steffen Klassert <steffen.klassert@secunet.com>
Date: 2012-07-19 11:38:18

On Wed, Jul 18, 2012 at 11:24:04AM -0700, David Miller wrote:
+
+static void rt_bind_exception(struct rtable *rt, struct fib_nh_exception *fnhe)
+{
+	if (fnhe->fnhe_pmtu) {
+		unsigned long expires = fnhe->fnhe_expires;
+		unsigned long diff = jiffies - expires;
This should be diff = expires - jiffies

With that changed, everything seems to work fine :)
+
+		if (time_before(jiffies, expires)) {
+			rt->rt_pmtu = fnhe->fnhe_pmtu;
+			dst_set_expires(&rt->dst, diff);
 		}
 	}
+	if (fnhe->fnhe_gw) {
+		rt->rt_flags |= RTCF_REDIRECTED;
+		rt->rt_gateway = fnhe->fnhe_gw;
+	}
+	fnhe->fnhe_stamp = jiffies;
 }
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help