diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c index 4362ffe9b5ef0b1f721a551b79a60805352b3b85..994dd1520f07a4ecc4f3ad8601b085d80b87c3ec 100644 --- a/net/core/flow_dissector.c +++ b/net/core/flow_dissector.c @@ -630,9 +630,10 @@ bool __skb_flow_dissect(const struct sk_buff *skb, nhoff = skb_network_offset(skb); hlen = skb_headlen(skb); #if IS_ENABLED(CONFIG_NET_DSA) - if (unlikely(skb->dev && netdev_uses_dsa(skb->dev))) { + if (unlikely(skb->dev && netdev_uses_dsa(skb->dev) && + proto == htons(ETH_P_XDSA))) { const struct dsa_device_ops *ops; - int offset; + int offset = 0; ops = skb->dev->dsa_ptr->tag_ops; if (ops->flow_dissect &&