Re: [PATCH] netfilter: Fix build failure when ipv6 but xt_tproxy is built in

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

 



Hi,

On 04/05/2011 04:49 PM, Patrick McHardy wrote:
>> What about something like this?
>>
>> diff --git a/net/netfilter/xt_TPROXY.c b/net/netfilter/xt_TPROXY.c
>> index dcfd57e..1ef0e56 100644
>> --- a/net/netfilter/xt_TPROXY.c
>> +++ b/net/netfilter/xt_TPROXY.c
>> @@ -283,10 +283,10 @@ tproxy_tg6_v1(struct sk_buff *skb, const struct xt_action_param *par)
>>         const struct in6_addr *laddr;
>>         __be16 lport;
>>         int thoff;
>> -       int tproto;
>> +       u8 tproto = iph->nexthdr;
>>  
>> -       tproto = ipv6_find_hdr(skb, &thoff, -1, NULL);
>> -       if (tproto < 0) {
>> +       thoff = ipv6_skip_exthdr(skb, sizeof(*iph), &tproto);
>> +       if (thoff < 0) {
>>                 pr_debug("unable to find transport header in IPv6 packet, dropping\n");
>>                 return NF_DROP;
>>         }
> 
> Looks good to me. Please formally submit this including a Signed-off-by:
> line and I'll push it upstream.

Will do, as soon as I have a chance to run the test suite. Thanks Patrick.

-- 
KOVACS Krisztian
--
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