Re: [PATCH] net: check if protocol extracted by virtio_net_hdr_set_proto is correct

2021-02-23 Thread Willem de Bruijn
On Tue, Feb 23, 2021 at 8:48 AM Balazs Nemeth wrote: > > On Mon, 2021-02-22 at 11:39 +0800, Jason Wang wrote: > > > > On 2021/2/19 10:55 下午, Willem de Bruijn wrote: > > > On Fri, Feb 19, 2021 at 3:53 AM Jason Wang > > > wrote: > > > > > > > > On 2021/2/18 11:50 下午, Willem de Bruijn wrote: > > > >

Re: [PATCH] net: check if protocol extracted by virtio_net_hdr_set_proto is correct

2021-02-23 Thread Balazs Nemeth
On Mon, 2021-02-22 at 11:39 +0800, Jason Wang wrote: > > On 2021/2/19 10:55 下午, Willem de Bruijn wrote: > > On Fri, Feb 19, 2021 at 3:53 AM Jason Wang > > wrote: > > > > > > On 2021/2/18 11:50 下午, Willem de Bruijn wrote: > > > > On Thu, Feb 18, 2021 at 10:01 AM Balazs Nemeth < > > > > bnem...@re

Re: [PATCH] net: check if protocol extracted by virtio_net_hdr_set_proto is correct

2021-02-21 Thread Jason Wang
On 2021/2/19 10:55 下午, Willem de Bruijn wrote: On Fri, Feb 19, 2021 at 3:53 AM Jason Wang wrote: On 2021/2/18 11:50 下午, Willem de Bruijn wrote: On Thu, Feb 18, 2021 at 10:01 AM Balazs Nemeth wrote: For gso packets, virtio_net_hdr_set_proto sets the protocol (if it isn't set) based on the

Re: [PATCH] net: check if protocol extracted by virtio_net_hdr_set_proto is correct

2021-02-19 Thread Willem de Bruijn
On Fri, Feb 19, 2021 at 3:53 AM Jason Wang wrote: > > > On 2021/2/18 11:50 下午, Willem de Bruijn wrote: > > On Thu, Feb 18, 2021 at 10:01 AM Balazs Nemeth wrote: > >> For gso packets, virtio_net_hdr_set_proto sets the protocol (if it isn't > >> set) based on the type in the virtio net hdr, but the

Re: [PATCH] net: check if protocol extracted by virtio_net_hdr_set_proto is correct

2021-02-19 Thread Jason Wang
On 2021/2/18 11:50 下午, Willem de Bruijn wrote: On Thu, Feb 18, 2021 at 10:01 AM Balazs Nemeth wrote: For gso packets, virtio_net_hdr_set_proto sets the protocol (if it isn't set) based on the type in the virtio net hdr, but the skb could contain anything since it could come from packet_snd th

Re: [PATCH] net: check if protocol extracted by virtio_net_hdr_set_proto is correct

2021-02-18 Thread Willem de Bruijn
On Thu, Feb 18, 2021 at 10:01 AM Balazs Nemeth wrote: > > For gso packets, virtio_net_hdr_set_proto sets the protocol (if it isn't > set) based on the type in the virtio net hdr, but the skb could contain > anything since it could come from packet_snd through a raw socket. If > there is a mismatch

[PATCH] net: check if protocol extracted by virtio_net_hdr_set_proto is correct

2021-02-18 Thread Balazs Nemeth
For gso packets, virtio_net_hdr_set_proto sets the protocol (if it isn't set) based on the type in the virtio net hdr, but the skb could contain anything since it could come from packet_snd through a raw socket. If there is a mismatch between what virtio_net_hdr_set_proto sets and the actual protoc