public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] 2.6.22.6 netfilter: sk_setup_caps in ip_make_route_harder
@ 2007-09-19  9:36 lepton
  2007-09-19 15:00 ` Patrick McHardy
  0 siblings, 1 reply; 2+ messages in thread
From: lepton @ 2007-09-19  9:36 UTC (permalink / raw)
  To: kaber; +Cc: lkm

Hi,
  For local src packets, it is better to update sk_route_caps in
  ip_route_me_harder.

Signed-off-by: Lepton Wu <ytht.net@gmail.com>

diff -pru -X linux-2.6.22.6/Documentation/dontdiff linux-2.6.22.6/net/ipv4/netfilter.c linux-2.6.22.6-lepton/net/ipv4/netfilter.c
--- linux-2.6.22.6/net/ipv4/netfilter.c	2007-09-19 13:19:13.000000000 +0800
+++ linux-2.6.22.6-lepton/net/ipv4/netfilter.c	2007-09-19 17:10:36.000000000 +0800
@@ -37,6 +37,10 @@ int ip_route_me_harder(struct sk_buff **
 		/* Drop old route. */
 		dst_release((*pskb)->dst);
 		(*pskb)->dst = &rt->u.dst;
+		if((*pskb)->sk){
+			dst_hold((*pskb)->dst);
+			sk_setup_caps((*pskb)->sk, (*pskb)->dst);
+		}
 	} else {
 		/* non-local src, find valid iif to satisfy
 		 * rp-filter when calling ip_route_input. */

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

end of thread, other threads:[~2007-09-19 15:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-19  9:36 [RFC PATCH] 2.6.22.6 netfilter: sk_setup_caps in ip_make_route_harder lepton
2007-09-19 15:00 ` Patrick McHardy

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