]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Add driver capability flag for CAN_REPLACE_PTK0
authorAlexander Wetzel <alexander@wetzel-home.de>
Sat, 4 Jan 2020 22:10:00 +0000 (23:10 +0100)
committerJouni Malinen <j@w1.fi>
Sun, 23 Feb 2020 10:00:23 +0000 (12:00 +0200)
The CAN_REPLACE_PTK0 flag provided by nl80211 can be used to detect if
the card/driver is explicitly indicating capability to rekey STA PTK
keys using only keyid 0 correctly.

Check if the card/driver supports it and make the status available as a
driver flag.

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

index 64fc0fd90ff5199f3a2ed708a6504c1945f2a270..48dd3fe525921a4e6c85916e5229ff71d2931a04 100644 (file)
@@ -1838,6 +1838,8 @@ struct wpa_driver_capa {
 #define WPA_DRIVER_FLAGS_VLAN_OFFLOAD          0x0800000000000000ULL
 /** Driver supports UPDATE_FT_IES command */
 #define WPA_DRIVER_FLAGS_UPDATE_FT_IES         0x1000000000000000ULL
+/** Driver can correctly rekey PTKs without Extended Key ID */
+#define WPA_DRIVER_FLAGS_SAFE_PTK0_REKEYS      0x2000000000000000ULL
        u64 flags;
 
 #define FULL_AP_CLIENT_STATE_SUPP(drv_flags) \
index a0f6e52ea7ef5c62bfd622a4ece2d1068e2ea5ad..61c8c2556ee0272b3d3ed4d170cf183cb15e2063 100644 (file)
@@ -445,6 +445,10 @@ static void wiphy_info_ext_feature_flags(struct wiphy_info_data *info,
        if (ext_feature_isset(ext_features, len,
                              NL80211_EXT_FEATURE_VLAN_OFFLOAD))
                capa->flags |= WPA_DRIVER_FLAGS_VLAN_OFFLOAD;
+
+       if (ext_feature_isset(ext_features, len,
+                             NL80211_EXT_FEATURE_CAN_REPLACE_PTK0))
+               capa->flags |= WPA_DRIVER_FLAGS_SAFE_PTK0_REKEYS;
 }