> > + if (local->bridge_packets && (sdata->type == IEEE80211_IF_TYPE_AP || > > + sdata->type == IEEE80211_IF_TYPE_VLAN) && > > i may miss something, but wouldn't you prefer to use eth_type_trans > here and just add compare_ether_addr check after it? Yes, I think I would, but I also think it's wrong to call eth_type_trans. We always remove the rfc2042 header and replace it with a regular ethernet header; but in the case there was no rfc2042 header we just stick in the length. But the length of a wireless packet can be bigger than the 1536 below which eth_type_trans assumes it's a length, so when we stick in a length>1536 it'll assume it's not a length but rather an ethertype, which will be wrong. The thing is, I couldn't so far even find the case where we receive a frame *without* rfc2042 header. johannes
Attachment:
signature.asc
Description: This is a digitally signed message part