Message ID | 20240805105649.1944132-3-boris.sukholitko@broadcom.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | tc: adjust network header after second vlan push | expand |
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 23f0db1db048..1bd817c8ddc8 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -6237,7 +6237,6 @@ static int skb_vlan_flush(struct sk_buff *skb) return err; skb->protocol = skb->vlan_proto; - skb->mac_len += VLAN_HLEN; skb_postpush_rcsum(skb, skb->data + (2 * ETH_ALEN), VLAN_HLEN); return 0; @@ -6252,6 +6251,8 @@ int skb_vlan_push(struct sk_buff *skb, __be16 vlan_proto, u16 vlan_tci) int err = skb_vlan_flush(skb); if (err) return err; + + skb->mac_len += VLAN_HLEN; } __vlan_hwaccel_put_tag(skb, vlan_proto, vlan_tci); return 0;
Let its callers worry about skb headers adjustment. Signed-off-by: Boris Sukholitko <boris.sukholitko@broadcom.com> --- net/core/skbuff.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)