madwifi: handle frame classification properly if eth->h_proto contains the protocol number directly (without offset)

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16237 3c298f89-4303-0410-b956-a3cf2f4a3e73
master
Felix Fietkau 2009-05-31 17:15:09 +00:00
parent c360bce6a4
commit 83db58db63
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@
skb->pkt_type = PACKET_OTHERHOST;
- return eth->h_proto;
+ if (ntohs(eth->h_proto) >= 1536)
+ if ((ntohs(eth->h_proto) >= 1536) || (ntohs(eth->h_proto) < 38))
+ return eth->h_proto;
+ return htons(ETH_P_802_2);
}