aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/skbuff.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2016-04-23 18:26:24 -0400
committerDavid S. Miller <davem@davemloft.net>2016-04-23 18:51:33 -0400
commit1602f49b58abcb0d34a5f0a29d68e7c1769547aa (patch)
tree4848fb0ffbc581ff465fd9c9e5a5b10b06f09b68 /net/core/skbuff.c
parentMerge branch 'geneve-vxlan-deps' (diff)
parentMerge tag 'rtc-4.6-3' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux (diff)
downloadlinux-dev-1602f49b58abcb0d34a5f0a29d68e7c1769547aa.tar.xz
linux-dev-1602f49b58abcb0d34a5f0a29d68e7c1769547aa.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts were two cases of simple overlapping changes, nothing serious. In the UDP case, we need to add a hlist_add_tail_rcu() to linux/rculist.h, because we've moved UDP socket handling away from using nulls lists. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/skbuff.c')
-rw-r--r--net/core/skbuff.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 4cc594cdaada..7ff7788b0151 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -4529,13 +4529,16 @@ int skb_vlan_push(struct sk_buff *skb, __be16 vlan_proto, u16 vlan_tci)
__skb_push(skb, offset);
err = __vlan_insert_tag(skb, skb->vlan_proto,
skb_vlan_tag_get(skb));
- if (err)
+ if (err) {
+ __skb_pull(skb, offset);
return err;
+ }
+
skb->protocol = skb->vlan_proto;
skb->mac_len += VLAN_HLEN;
- __skb_pull(skb, offset);
skb_postpush_rcsum(skb, skb->data + (2 * ETH_ALEN), VLAN_HLEN);
+ __skb_pull(skb, offset);
}
__vlan_hwaccel_put_tag(skb, vlan_proto, vlan_tci);
return 0;