netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Jan Engelhardt <jengelh@medozas.de>
Cc: Florian Westphal <fw@strlen.de>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH RFC 2/3] netfilter: add ipv4 reverse path filter match
Date: Tue, 30 Aug 2011 15:54:10 +0200	[thread overview]
Message-ID: <4E5CEB82.4050302@trash.net> (raw)
In-Reply-To: <alpine.LNX.2.01.1108301552010.17682@frira.zrqbmnf.qr>

On 30.08.2011 15:53, Jan Engelhardt wrote:
> 
> On Tuesday 2011-08-30 14:57, Florian Westphal wrote:
>>>
>>> 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.
> 
> What could be done is:
> 
> struct xt_match {
> 	union {
> 		int (*match)(const struct sk_buff *, ...);
> 		int (*match_nonc)(struct sk_buff *, ...);
> 	};
> };
> 
> falls into the same "ugh, what beauty" category :-)

Yes, I've considered that as well. But yeah, its not much better than
simply casting the const away.

  reply	other threads:[~2011-08-30 13:54 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
2011-08-30 13:53           ` Jan Engelhardt
2011-08-30 13:54             ` Patrick McHardy [this message]
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=4E5CEB82.4050302@trash.net \
    --to=kaber@trash.net \
    --cc=fw@strlen.de \
    --cc=jengelh@medozas.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).