[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3ebfc32c-6c2e-626b-493f-27e326ddb5b9@6wind.com>
Date: Tue, 15 Jan 2019 10:49:49 +0100
From: Nicolas Dichtel <nicolas.dichtel@...nd.com>
To: Willem de Bruijn <willemdebruijn.kernel@...il.com>
Cc: David Miller <davem@...emloft.net>,
Network Development <netdev@...r.kernel.org>
Subject: Re: [PATCH net] af_packet: fix raw sockets over 6in4 tunnel
Le 14/01/2019 à 16:38, Willem de Bruijn a écrit :
> On Mon, Jan 14, 2019 at 10:15 AM Willem de Bruijn
> <willemdebruijn.kernel@...il.com> wrote:
[snip]
>> It is wrong because for other devices l2 header length is not zero, so
>> this incorrectly sets skb->network_header to the start of the link
>> layer header on all those devices.
Ok, thank you for the details.
>>
>> A one line variant of the above would be
>>
>> - if (len < reserve)
>> + if (len < reserve + sizeof(struct ipv6hdr))
>
> and exclude the majority of devices with fixed hard header len. Those
> require len to be >= reserve, so this workaround does not apply to
> them:
>
> if (len < reserve + sizeof(struct ipv6hdr) &&
> dev->min_header_len != dev->hard_header_len)
>
And what about:
- if (len < reserve)
+ if (dev->min_header_len != dev->hard_header_len)
skb_reset_network_header(skb);
?
Powered by blists - more mailing lists