Re: [PATCH net-next v2 1/7] net: Don't set transport offset to invalid value

2019-02-22 Thread Willem de Bruijn
on Wang > > ; Eric Dumazet ; > > netdev@vger.kernel.org; Eran Ben Elisha ; Tariq Toukan > > > > Subject: Re: [PATCH net-next v2 1/7] net: Don't set transport offset to > > invalid value > > > > On Thu, Feb 21, 2019 at 7:40 AM Maxim Mikityanskiy > >

RE: [PATCH net-next v2 1/7] net: Don't set transport offset to invalid value

2019-02-22 Thread Maxim Mikityanskiy
ubject: Re: [PATCH net-next v2 1/7] net: Don't set transport offset to > invalid value > > On Thu, Feb 21, 2019 at 7:40 AM Maxim Mikityanskiy > wrote: > > > > If the socket was created with socket(AF_PACKET, SOCK_RAW, 0), > > skb->protocol will be unset, __skb

Re: [PATCH net-next v2 1/7] net: Don't set transport offset to invalid value

2019-02-21 Thread Willem de Bruijn
On Thu, Feb 21, 2019 at 7:40 AM Maxim Mikityanskiy wrote: > > If the socket was created with socket(AF_PACKET, SOCK_RAW, 0), > skb->protocol will be unset, __skb_flow_dissect() will fail, and > skb_probe_transport_header() will fall back to the offset_hint, making > the resulting skb_transport_off

[PATCH net-next v2 1/7] net: Don't set transport offset to invalid value

2019-02-21 Thread Maxim Mikityanskiy
If the socket was created with socket(AF_PACKET, SOCK_RAW, 0), skb->protocol will be unset, __skb_flow_dissect() will fail, and skb_probe_transport_header() will fall back to the offset_hint, making the resulting skb_transport_offset incorrect. If, however, there is no transport header in the pack