Subject: Re: [PATCH net 1/2] packet: do skb_probe_transport_header when we actually have data

From: Daniel Borkmann <[email-masked]>
Date: Mon, 09 Nov 2015 09:43:09 +0100

On 11/09/2015 04:11 AM, David Miller wrote:
> From: Daniel Borkmann <[email-masked]>
> Date: Sun, 08 Nov 2015 01:33:56 +0100
>
>> Hmm, yeah, on a (only quick) look, it seems this is mostly needed for
>> the
>> virtio_net related code in packet_snd() / packet_recvmsg(), not
>> handled in
>> RX/TX ring paths actually.
>>
>> $ git grep -n gso_size net/packet/
>> net/packet/af_packet.c:2748: if (vnet_hdr.gso_size == 0)
>> net/packet/af_packet.c:2825:            skb_shinfo(skb)->gso_size =
>> net/packet/af_packet.c:2826: __virtio16_to_cpu(vio_le(),
>> vnet_hdr.gso_size);
>> net/packet/af_packet.c:3219:                    vnet_hdr.gso_size =
>> net/packet/af_packet.c:3220: __cpu_to_virtio16(vio_le(),
>> sinfo->gso_size);
>>
>> Need to take a closer look on Monday.
>
> I think for complete safety, we need the transport header set for
> all SKBs once they hit the device.
>
> I know this is separate from the bugs you are trying to fix, but
> let's take care of this in this series ok?

Ok, sure. I can add an extra one into this series removing the
conditional.

Thanks,
Daniel