From: Patrick McHardy <kaber@trash.net>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH RFC 2/3] netfilter: add ipv4 reverse path filter match
Date: Tue, 30 Aug 2011 14:45:37 +0200 [thread overview]
Message-ID: <4E5CDB71.9080504@trash.net> (raw)
In-Reply-To: <20110830124119.GB7548@Chamillionaire.breakpoint.cc>
On 30.08.2011 14:41, Florian Westphal wrote:
> Patrick McHardy <kaber@trash.net> wrote:
>>> main drawback:
>>> - additional fib lookup to get oif (used as flow key in reverse lookup)
>>
>> As discussed during the workshop, we could just perform input routing
>> in the module to get the oif for free. That would require to take care
>> of statistics as currently done in ip_rcv_finish() though.
>
> Right.
> Any idea on how to solve the 'struct sk_buff *' (ip_route_input) vs.
> 'const struct sk_buff *' (matches) problem?
>
> We'd have to modify all the match signatures...
Some modules already remove the const by casting it away, not
pretty, but works. Since the kernel doesn't assume strict aliasing
this also shouldn't cause any problems in the future. Alternatively
we can change the function signatures of course, although that would
be a bit unfortunate just for this special case.
>>> Other issues:
>>> - can't use FORWARD chain because by the time FORWARD is invoked
>>> ipv4 forward path may have already sent icmp messages is response
>>> to to-be-discarded-via-rpfilter packets
>>> - using it in PREROUTING may do the wrong thing (e.g. when using
>>> policy routing via mangle PREROUTING)
>>
>> Not if you're setting up policy routing keys (marks) before doing
>> rp_filter, right? Would require using it in the mangle table of
>> course.
>
> Yes that should work as well.
> It might be unexpected for some people, though (but this is just a
> documentation issue).
I agree.
next prev parent reply other threads:[~2011-08-30 12:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-26 9:21 [PATCH RFC 0/3] netfilter reverse path filter matches Florian Westphal
2011-08-26 9:21 ` [PATCH RFC 1/3] netfilter: add reverse path filter match Florian Westphal
2011-08-26 9:21 ` [PATCH RFC 2/3] netfilter: add ipv4 " Florian Westphal
2011-08-30 12:34 ` Patrick McHardy
2011-08-30 12:41 ` Florian Westphal
2011-08-30 12:45 ` Patrick McHardy [this message]
2011-08-30 12:57 ` Florian Westphal
2011-08-30 13:03 ` Patrick McHardy
2011-08-30 13:53 ` Jan Engelhardt
2011-08-30 13:54 ` Patrick McHardy
2011-08-26 9:21 ` [PATCH RFC 3/3] ip6t_rpf: initial version Florian Westphal
2011-08-26 9:58 ` Jan Engelhardt
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=4E5CDB71.9080504@trash.net \
--to=kaber@trash.net \
--cc=fw@strlen.de \
--cc=netfilter-devel@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;
as well as URLs for NNTP newsgroup(s).