]> git.ipfire.org Git - thirdparty/hostap.git/commit
nl80211: Migrate to current netlink key message format
authorAlexander Wetzel <alexander@wetzel-home.de>
Sun, 15 Sep 2019 20:08:22 +0000 (22:08 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 19 Sep 2019 09:48:37 +0000 (12:48 +0300)
commit83b83b461d428ef2d32ef884620e6379fd9805b9
treeb312d370129bc00c4aba5b25891db33cb35dbd5b
parent7a4b01c8797e958f18f336f23103a29d098f90e8
nl80211: Migrate to current netlink key message format

Linux 2.6.32 (December 2009) introduced alternate netlink messages
for setting and installing keys, deprecating the older ones.

To allow hostapd/wpa_supplicant to use new features only provided via
the new API this patch migrates all netlink messages to the current ones.

Since the nl80211 driver was sometimes already using the new format this
is only unifying the netlink API usage and not changing the minimal
kernel requirement.

The following netlink attributes have been retired for key installs:

  NL80211_ATTR_KEY_DATA
  NL80211_ATTR_KEY_TYPE
  NL80211_ATTR_KEY_SEQ
  NL80211_ATTR_KEY_IDX
  NL80211_ATTR_KEY_CIPHER
  NL80211_ATTR_KEY_DEFAULT
  NL80211_ATTR_KEY_DEFAULT_MGMT
  NL80211_ATTR_KEY_DEFAULT_TYPES

And replaced by the following attributes nested in NL80211_ATTR_KEY:

  NL80211_KEY_DATA
  NL80211_KEY_TYPE
  NL80211_KEY_SEQ
  NL80211_KEY_IDX
  NL80211_KEY_CIPHER
  NL80211_KEY_DEFAULT
  NL80211_KEY_DEFAULT_MGMT
  NL80211_KEY_DEFAULT_TYPES

When getting Michael MIC failure notifications or querying a key
sequence number the kernel continues to use the old attributes:
  NL80211_ATTR_KEY_TYPE
  NL80211_ATTR_KEY_SEQ
  NL80211_ATTR_KEY_IDX

Signed-off-by: Alexander Wetzel <alexander@wetzel-home.de>
src/drivers/driver_nl80211.c