Search Linux Wireless

Re: [PATCH 2/2] mac80211: Monitor mode radiotap-based packet injection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael Wu wrote:
On Saturday 17 March 2007 17:30, Michael Wu wrote:
+		/* process and remove the injection radiotap header */
+
+	if(control->flags & IEEE80211_TXCTL_INJECTED_PACKET) {
dev points to the virtual interface that the frame originally came in on.
You can get sdata from that and figure out if the interface was a monitor
interface.

Of course, this depends on ifindex being set properly.

You added:
	pkt_data->ifindex =  local->mdev->ifindex;

but in that same function, this is used instead:
	pkt_data->ifindex = sdata->dev->ifindex;

Which allows the master device to figure out which virtual interface the skb came from.

Yeah naturally it was my first move to use what was there, but the result was a panic that went away when I moved the skb to belong to the "master" interface's index and separately persistently tagged the packet as being injected.

Is it safe against race problems on interface removal to consider to look up against the interface index at actual send time?

-Andy

-
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

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux