linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Problem with sending pkt on a monitor port
@ 2018-09-19 20:33 Ben Greear
  2018-09-19 20:35 ` Johannes Berg
  0 siblings, 1 reply; 7+ messages in thread
From: Ben Greear @ 2018-09-19 20:33 UTC (permalink / raw)
  To: linux-wireless@vger.kernel.org

This is with a modified 4.16.18+ kernel, though the code in question
is from 2011, so this is not new...

I am attempting to use radiotap packet injection on a monitor port.

In the ieee80211_monitor_start_xmit method, before this code below
runs, sdata is 'moni6a', my monitor port.  But, since I have a
station wlan1 with the same MAC address, then when this code is
completed, stdata becomes wlan1.

Ath10k has all sorts of issues transmitting raw frames, and sending on
the wrong vdev only makes it even more broken!

If user-space binds a socket to a monitor vdev and transmits a frame,
why would we want to change the vdev here?

	list_for_each_entry_rcu(tmp_sdata, &local->interfaces, list) {
		if (!ieee80211_sdata_running(tmp_sdata))
			continue;
		if (tmp_sdata->vif.type == NL80211_IFTYPE_MONITOR ||
		    tmp_sdata->vif.type == NL80211_IFTYPE_AP_VLAN ||
		    tmp_sdata->vif.type == NL80211_IFTYPE_WDS)
			continue;
		if (ether_addr_equal(tmp_sdata->vif.addr, hdr->addr2)) {
			sdata = tmp_sdata;
			break;
		}
	}

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-09-28 15:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-19 20:33 Problem with sending pkt on a monitor port Ben Greear
2018-09-19 20:35 ` Johannes Berg
2018-09-19 20:47   ` Ben Greear
2018-09-20  7:31     ` Johannes Berg
2018-09-20 14:26       ` Ben Greear
2018-09-28  7:14         ` Johannes Berg
2018-09-28 15:22           ` Ben Greear

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).