diff options
Diffstat (limited to 'net/ethernet')
-rw-r--r-- | net/ethernet/eth.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c index 647a9edee375..dae47e7a44d8 100644 --- a/net/ethernet/eth.c +++ b/net/ethernet/eth.c | |||
@@ -57,6 +57,7 @@ | |||
57 | #include <net/sock.h> | 57 | #include <net/sock.h> |
58 | #include <net/ipv6.h> | 58 | #include <net/ipv6.h> |
59 | #include <net/ip.h> | 59 | #include <net/ip.h> |
60 | #include <net/dsa.h> | ||
60 | #include <asm/uaccess.h> | 61 | #include <asm/uaccess.h> |
61 | #include <asm/system.h> | 62 | #include <asm/system.h> |
62 | 63 | ||
@@ -184,6 +185,15 @@ __be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev) | |||
184 | skb->pkt_type = PACKET_OTHERHOST; | 185 | skb->pkt_type = PACKET_OTHERHOST; |
185 | } | 186 | } |
186 | 187 | ||
188 | /* | ||
189 | * Some variants of DSA tagging don't have an ethertype field | ||
190 | * at all, so we check here whether one of those tagging | ||
191 | * variants has been configured on the receiving interface, | ||
192 | * and if so, set skb->protocol without looking at the packet. | ||
193 | */ | ||
194 | if (netdev_uses_dsa_tags(dev)) | ||
195 | return htons(ETH_P_DSA); | ||
196 | |||
187 | if (ntohs(eth->h_proto) >= 1536) | 197 | if (ntohs(eth->h_proto) >= 1536) |
188 | return eth->h_proto; | 198 | return eth->h_proto; |
189 | 199 | ||