From: lepton <ytht.net@gmail.com>
To: kaber@trash.net
Cc: lkm <linux-kernel@vger.kernel.org>
Subject: [RFC PATCH] 2.6.22.6 netfilter: sk_setup_caps in ip_make_route_harder
Date: Wed, 19 Sep 2007 17:36:48 +0800 [thread overview]
Message-ID: <20070919093648.GA7491@router.lepton.home> (raw)
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. */
next reply other threads:[~2007-09-19 9:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-19 9:36 lepton [this message]
2007-09-19 15:00 ` Patrick McHardy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070919093648.GA7491@router.lepton.home \
--to=ytht.net@gmail.com \
--cc=kaber@trash.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®