Re: [PATCH net] vlan: pull on __vlan_insert_tag error path and fix csum correction

2016-04-03 Thread Daniel Borkmann
On 04/02/2016 02:04 AM, Daniel Borkmann wrote: On 04/01/2016 11:28 PM, Daniel Borkmann wrote: On 04/01/2016 09:00 PM, David Miller wrote: From: Daniel Borkmann Date: Fri, 1 Apr 2016 11:41:03 +0200 Moreover, I noticed that when in the non-error path the __skb_pull() is done and the original

Re: [PATCH net] vlan: pull on __vlan_insert_tag error path and fix csum correction

2016-04-01 Thread Daniel Borkmann
On 04/01/2016 11:28 PM, Daniel Borkmann wrote: On 04/01/2016 09:00 PM, David Miller wrote: From: Daniel Borkmann Date: Fri, 1 Apr 2016 11:41:03 +0200 Moreover, I noticed that when in the non-error path the __skb_pull() is done and the original offset to mac header was non-zero, we fixup from

Re: [PATCH net] vlan: pull on __vlan_insert_tag error path and fix csum correction

2016-04-01 Thread Daniel Borkmann
On 04/01/2016 09:00 PM, David Miller wrote: From: Daniel Borkmann Date: Fri, 1 Apr 2016 11:41:03 +0200 Moreover, I noticed that when in the non-error path the __skb_pull() is done and the original offset to mac header was non-zero, we fixup from a wrong skb->data offset in the checksum comple

Re: [PATCH net] vlan: pull on __vlan_insert_tag error path and fix csum correction

2016-04-01 Thread David Miller
From: Daniel Borkmann Date: Fri, 1 Apr 2016 11:41:03 +0200 > Moreover, I noticed that when in the non-error path the __skb_pull() > is done and the original offset to mac header was non-zero, we fixup > from a wrong skb->data offset in the checksum complete processing. > > So the skb_postpush_r

[PATCH net] vlan: pull on __vlan_insert_tag error path and fix csum correction

2016-04-01 Thread Daniel Borkmann
When __vlan_insert_tag() fails from skb_vlan_push() path due to the skb_cow_head(), we need to undo the __skb_push() in the error path as well that was done earlier to move skb->data pointer to mac header. Moreover, I noticed that when in the non-error path the __skb_pull() is done and the origina