[PATCH 28/44] FT: preset r1_key_holder to bssid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Michael Braun <michael-dev@xxxxxxxxxxxxx>

r1_key_holder is an identifier that always set to zero if unless
configured before.

See section 11.6.1.7.4 of 802.11-2012 which reads
 "R1KH-ID is a MAC address of the holder of the PMK-R1 in the
  Authenticator of the AP"
See section 12.2.2 of 802.11-12 which reads
 "Each R0KH-ID and R1KH-ID is assumed to be expressed as a unique
  identifier within the mobility domain."
 "The R1KH-ID shall be set to a MAC address of the physical entity
  that stores the PMK-R1 ..."

So I think defaulting this to BSSID is a more reasonable default.
Though, I'm not aware of any issues with changeing / not changing this.

Signed-off-by: Michael Braun <michael-dev@xxxxxxxxxxxxx>
---
 hostapd/hostapd.conf | 1 +
 src/ap/hostapd.c     | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/hostapd/hostapd.conf b/hostapd/hostapd.conf
index efc7a54..53983bb 100644
--- a/hostapd/hostapd.conf
+++ b/hostapd/hostapd.conf
@@ -1280,6 +1280,7 @@ own_ip_addr=127.0.0.1
 
 # PMK-R1 Key Holder identifier (dot11FTR1KeyHolderID)
 # 6-octet identifier as a hex string.
+# Defaults to BSSID.
 #r1_key_holder=000102030405
 
 # Reassociation deadline in time units (TUs / 1.024 ms; range 1000..65535)
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
index dd2dc17..6675f6f 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -940,6 +940,11 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first)
 	if (conf->wmm_enabled < 0)
 		conf->wmm_enabled = hapd->iconf->ieee80211n;
 
+#ifdef CONFIG_IEEE80211R
+	if (hostapd_mac_comp_empty(conf->r1_key_holder) == 0)
+		os_memcpy(conf->r1_key_holder, hapd->own_addr, ETH_ALEN);
+#endif /* CONFIG_IEEE80211R */
+
 #ifdef CONFIG_MESH
 	if (hapd->iface->mconf == NULL)
 		flush_old_stations = 0;
-- 
1.9.1


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux