xt_gateway 20070605 (kernel)
Jan Engelhardt
jengelh at computergmbh.de
Fri Jun 15 18:11:32 CEST 2007
On Jun 15 2007 12:30, Amin Azez wrote:
>This didn't seem to turn up on the mailing list, so I'm re-sending:
It did, at least for me. (And I truly mean the copy that netfilter.org
mailing list software sent me, since I still have that.)
>>> + if ((dst = skb->dst) == NULL)
>>> + return false;
>>> + if ((neigh = dst->neighbour) == NULL)
>>> + return false;
>>
>> Actually I very much prefer to have assignments seperated
>> from comparisons, there just were no instances of this in
>> the patches I commented on :)
>>
>> Most of the checks here are unnecessary anyway (we always
>> have a skb with skb->dst != NULL,
>maybe skb->dst = NULL on pre-routing?
>> neigh->tbl is always != NULL
>same?
>> and the neighbour table family is always AF_INET since the
>> match is only registered for AF_INET.
>>
>Maybe if I take out these checks, I should restrict the match to FORWARD
>and POSTROUTING?
Leaving them in does not cost too much.
>I'm being careful because while I am confident that what I submitted
>(and Jan modified for current kernels) is safe and works, I'm not
>confident that it will be safe with these changes.
>
Jan
--
More information about the netfilter-devel
mailing list