diff options
Diffstat (limited to 'net/bridge/br_vlan.c')
-rw-r--r-- | net/bridge/br_vlan.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/net/bridge/br_vlan.c b/net/bridge/br_vlan.c index 8249ca764c79..44f31af0b965 100644 --- a/net/bridge/br_vlan.c +++ b/net/bridge/br_vlan.c | |||
@@ -174,6 +174,18 @@ bool br_allowed_ingress(struct net_bridge *br, struct net_port_vlans *v, | |||
174 | if (!v) | 174 | if (!v) |
175 | return false; | 175 | return false; |
176 | 176 | ||
177 | /* If vlan tx offload is disabled on bridge device and frame was | ||
178 | * sent from vlan device on the bridge device, it does not have | ||
179 | * HW accelerated vlan tag. | ||
180 | */ | ||
181 | if (unlikely(!vlan_tx_tag_present(skb) && | ||
182 | (skb->protocol == htons(ETH_P_8021Q) || | ||
183 | skb->protocol == htons(ETH_P_8021AD)))) { | ||
184 | skb = vlan_untag(skb); | ||
185 | if (unlikely(!skb)) | ||
186 | return false; | ||
187 | } | ||
188 | |||
177 | err = br_vlan_get_tag(skb, vid); | 189 | err = br_vlan_get_tag(skb, vid); |
178 | if (!*vid) { | 190 | if (!*vid) { |
179 | u16 pvid = br_get_pvid(v); | 191 | u16 pvid = br_get_pvid(v); |