nl80211: add src and dst addr attributes for control port tx/rx
authorMarkus Theil <markus.theil@tu-ilmenau.de>
Wed, 15 Jan 2020 12:55:22 +0000 (13:55 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 7 Feb 2020 11:58:37 +0000 (12:58 +0100)
commit8c3ed7aa2b9ef666195b789e9b02e28383243fa8
tree271a9d36a6af297b55b5fb4ecaa08b92db413546
parentc0058df73309906ef4d5383fbaa10c43ebddc48a
nl80211: add src and dst addr attributes for control port tx/rx

When using control port over nl80211 in AP mode with
pre-authentication, APs need to forward frames to other
APs defined by their MAC address. Before this patch,
pre-auth frames reaching user space over nl80211 control
port  have no longer any information about the dest attached,
which can be used for forwarding to a controller or injecting
the frame back to a ethernet interface over a AF_PACKET
socket.
Analog problems exist, when forwarding pre-auth frames from
AP -> STA.

This patch therefore adds the NL80211_ATTR_DST_MAC and
NL80211_ATTR_SRC_MAC attributes to provide more context
information when forwarding.
The respective arguments are optional on tx and included on rx.
Therefore unaware existing software is not affected.

Software which wants to detect this feature, can do so
by checking against:
  NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211_MAC_ADDRS

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20200115125522.3755-1-markus.theil@tu-ilmenau.de
[split into separate cfg80211/mac80211 patches]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/net/cfg80211.h
include/uapi/linux/nl80211.h
net/mac80211/ieee80211_i.h
net/mac80211/tx.c
net/wireless/nl80211.c
net/wireless/rdev-ops.h
net/wireless/trace.h