eth.c (5f0d736e7f7db586141f974821b6ca6c1d906d5b) eth.c (cc1939e4b3aaf534fb2f3706820012036825731c)
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * Ethernet-type device handling.
7 *
8 * Version: @(#)eth.c 1.0.7 05/25/93

--- 171 unchanged lines hidden (view full) ---

180 }
181 }
182
183 /*
184 * Some variants of DSA tagging don't have an ethertype field
185 * at all, so we check here whether one of those tagging
186 * variants has been configured on the receiving interface,
187 * and if so, set skb->protocol without looking at the packet.
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * Ethernet-type device handling.
7 *
8 * Version: @(#)eth.c 1.0.7 05/25/93

--- 171 unchanged lines hidden (view full) ---

180 }
181 }
182
183 /*
184 * Some variants of DSA tagging don't have an ethertype field
185 * at all, so we check here whether one of those tagging
186 * variants has been configured on the receiving interface,
187 * and if so, set skb->protocol without looking at the packet.
188 * The DSA tagging protocol may be able to decode some but not all
189 * traffic (for example only for management). In that case give it the
190 * option to filter the packets from which it can decode source port
191 * information.
188 */
192 */
189 if (unlikely(netdev_uses_dsa(dev)))
193 if (unlikely(netdev_uses_dsa(dev)) && dsa_can_decode(skb, dev))
190 return htons(ETH_P_XDSA);
191
192 if (likely(eth_proto_is_802_3(eth->h_proto)))
193 return eth->h_proto;
194
195 /*
196 * This is a magic hack to spot IPX packets. Older Novell breaks
197 * the protocol design and runs IPX over 802.3 without an 802.2 LLC

--- 408 unchanged lines hidden ---
194 return htons(ETH_P_XDSA);
195
196 if (likely(eth_proto_is_802_3(eth->h_proto)))
197 return eth->h_proto;
198
199 /*
200 * This is a magic hack to spot IPX packets. Older Novell breaks
201 * the protocol design and runs IPX over 802.3 without an 802.2 LLC

--- 408 unchanged lines hidden ---