Re: [PATCH bpf] bpf: fix bpf_skb_adjust_net/bpf_skb_proto_xlat to deal with gso sctp skbs

2018-03-03 Thread Alexei Starovoitov
On Sat, Mar 03, 2018 at 09:57:15PM +0100, Daniel Borkmann wrote: > On 03/03/2018 05:02 PM, Daniel Axtens wrote: > >> From: Daniel Axtens > >> > >> SCTP GSO skbs have a gso_size of GSO_BY_FRAGS, so any sort of > >> unconditionally mangling of that will result in nonsense value >

Re: [PATCH bpf] bpf: fix bpf_skb_adjust_net/bpf_skb_proto_xlat to deal with gso sctp skbs

2018-03-03 Thread Daniel Borkmann
On 03/03/2018 05:02 PM, Daniel Axtens wrote: >> From: Daniel Axtens >> >> SCTP GSO skbs have a gso_size of GSO_BY_FRAGS, so any sort of >> unconditionally mangling of that will result in nonsense value >> and would corrupt the skb later on. >> >> Therefore, i) add two helpers

Re: [PATCH bpf] bpf: fix bpf_skb_adjust_net/bpf_skb_proto_xlat to deal with gso sctp skbs

2018-03-03 Thread Daniel Axtens
Hi Daniel, > From: Daniel Axtens > > SCTP GSO skbs have a gso_size of GSO_BY_FRAGS, so any sort of > unconditionally mangling of that will result in nonsense value > and would corrupt the skb later on. > > Therefore, i) add two helpers skb_increase_gso_size() and >

[PATCH bpf] bpf: fix bpf_skb_adjust_net/bpf_skb_proto_xlat to deal with gso sctp skbs

2018-03-02 Thread Daniel Borkmann
From: Daniel Axtens SCTP GSO skbs have a gso_size of GSO_BY_FRAGS, so any sort of unconditionally mangling of that will result in nonsense value and would corrupt the skb later on. Therefore, i) add two helpers skb_increase_gso_size() and skb_decrease_gso_size() that would