On Thu, 2012-10-25 at 17:57 -0700, Thomas Pedersen wrote: > Oh, that hunk is already inside the MESH_FLAGS_AE check... so: > > > if (mesh_hdr->flags & MESH_FLAGS_AE_A4) { > mpp_addr = hdr->addr3; > proxied_addr = mesh_hdr->eaddr1; > } else if (mesh_hdr->flags & MESH_FLAGS_AE_A5_A6) { > mpp_addr = hdr->addr4; > proxied_addr = mesh_hdr->eaddr2; > } else > return RX_DROP_MONITOR; > > Should be ok since we already made sure to have enough data for each > address extension size. But that loses the is_multicast_ether_addr() check now, no? I mean, we wouldn't want to accept an AE_A4 frame unless A1 was multicast, at least not according to the original code? All I was trying to make sure is that eaddr1/2 exist when they're used, and that's the length check, but is equivalent (due to earlier checks) to testing AE_A4/AE_A5_A6, I think? None of your versions seem to be equivalent of the original code, which says that * multicast -> use addr3/eaddr1 * unicast -> use addr4/eaddr2 and I'm just adding checks that eaddr1/eaddr2 actually exist. Ohh, ok, no I see, I'm not doing that. What we really need to do is something entirely different: if (is_multicast_ether_addr(hdr->addr1)) { mpp_addr = hdr->addr3; proxied_addr = mesh_hdr->eaddr1; } else if (mesh_hdr->flags & MESH_FLAGS_AE_A5_A6) { /* has_a4 already checked in ieee80211_rx_mesh_check */ mpp_addr = hdr->addr4; proxied_addr = mesh_hdr->eaddr2; } else { return RX_DROP_MONITOR; } johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html