[net80211] don't add IBSS node table entries for neighbors from other SSIDs.
authoradrian <adrian@FreeBSD.org>
Wed, 21 Sep 2016 19:48:07 +0000 (19:48 +0000)
committeradrian <adrian@FreeBSD.org>
Wed, 21 Sep 2016 19:48:07 +0000 (19:48 +0000)
commit4768b99cef400507b1e0269e9d85827ad5be9041
treeb7a5407c1eb6645761bfe1880b63507a120b408b
parent284dd5b4f8495babe92d1009a6a1fb16c114bb29
[net80211] don't add IBSS node table entries for neighbors from other SSIDs.

The adhoc probe/beacon input path was creating nodes for all SSIDs.
This wasn't a problem when the NICs were configured to only process
frames for the current BSSID, but that didn't allow IBSS merges.
Once avos and I flipped on "beacons from all BSSIDs" to allow for
correct IBSS merging, we found this interesting behaviour.

This adds a check against the current SSID.

* If there's no VAP SSID, allow anything
* If there's a VAP SSID, check if the incoming frame has a suitable
  SSID and if so, allow it.

This prevents nodes being created for other SSIDs in probe and beacon
frames - ie, beacons overlapping IBSSes with different SSIDs, and
probe requests from arbitrary devices.

Tested:

* AR9380, IBSS mode, both local and other IBSSes.

Reviewed by: avos
Differential Revision: https://reviews.freebsd.org/D7959
sys/net80211/ieee80211_adhoc.c
sys/net80211/ieee80211_node.c
sys/net80211/ieee80211_node.h