Thread (4 messages) flat view 4 messages, 2 authors, 2012-07-18

Re: [PATCH 08/15] ipv4: Kill routes during PMTU/redirect updates.

From: David Miller <davem@davemloft.net>
Date: 2012-07-18 19:30:24

From: Joe Perches <joe@perches.com>
Date: Wed, 18 Jul 2012 12:15:44 -0700
On Wed, 2012-07-18 at 11:23 -0700, David Miller wrote:
quoted
Mark them obsolete so there will be a re-lookup to fetch the
FIB nexthop exception info.
[]
quoted
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
[]
quoted
@@ -716,8 +717,8 @@ static void __ip_do_redirect(struct rtable *rt, struct sk_buff *skb, struct flow
 					fnhe->fnhe_gw = new_gw;
 				spin_unlock_bh(&fnhe_lock);
 			}
-			rt->rt_gateway = new_gw;
-			rt->rt_flags |= RTCF_REDIRECTED;
+			if (kill_route)
+				rt->dst.obsolete = -2;
Perhaps -2 should be a #define?

Perhaps struct dst_entry.obsolete could be a char instead of
a short and a pad byte could added for some future use.
First thing, char is not signed by default on all systems :-)

But yes, this should be cleaned up.  Also with a big fat comment above
the struct member detailing it's usage.

I'll put this on my TODO list, thanks a lot Joe.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help