Re: [PATCH RFC 2/3] netfilter: add ipv4 reverse path filter match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux