From: Daniel Borkmann <dan...@iogearbox.net> Date: Sat, 16 Apr 2016 02:27:58 +0200
> 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 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_rcsum() really needs to be done before __skb_pull() > where skb->data still points to the mac header start and thus operates > under the same conditions as in __vlan_insert_tag(). > > Fixes: 93515d53b133 ("net: move vlan pop/push functions into common code") > Signed-off-by: Daniel Borkmann <dan...@iogearbox.net> > Reviewed-by: Jiri Pirko <j...@mellanox.com> > --- > v1 -> v2: > - Resend/code still the same, Jiri gave it a review as well meanwhile. Applied and queued up for -stable, thanks Daniel.