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 15:03:54 +0200 [thread overview]
Message-ID: <4E5CDFBA.3010509@trash.net> (raw)
In-Reply-To: <20110830125736.GD7548@Chamillionaire.breakpoint.cc>
On 30.08.2011 14:57, Florian Westphal wrote:
> Patrick McHardy <kaber@trash.net> wrote:
>> 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.
>
> Agreed, modifying the match function signature for this case would be
> sad.
>
> I'll wait a couple of days and will send an updated version
> that uses the ugly cast + ip_route_input.
Regarding the statistic update, I'd suggest to move those to
a new function and call it from your module to avoid duplication
and possibly getting out of sync in the future.
next prev parent reply other threads:[~2011-08-30 13:03 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
2011-08-30 12:57 ` Florian Westphal
2011-08-30 13:03 ` Patrick McHardy [this message]
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=4E5CDFBA.3010509@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).