aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2021-05-27 13:15:40 +0200
committerFelix Fietkau <nbd@nbd.name>2021-11-23 18:30:05 +0100
commit21eb0a5aa37f6711f3d0440be660f459d5a7fde6 (patch)
tree51d34a063ec0d20b93301e11e274b723b7b8d668
parent32b047e22e1d86c6400667ab2ae57806eb173014 (diff)
downloadupstream-21eb0a5aa37f6711f3d0440be660f459d5a7fde6.tar.gz
upstream-21eb0a5aa37f6711f3d0440be660f459d5a7fde6.tar.bz2
upstream-21eb0a5aa37f6711f3d0440be660f459d5a7fde6.zip
hostapd: add default values for r0kh/r1kh
This allows WPA enterprise roaming in the same mobility domain without any manual key configuration (aside from radius credentials) Signed-off-by: Felix Fietkau <nbd@nbd.name> (cherry-picked from commit 704ab6a002172e76d41612f6d07ff179ef035d10)
-rw-r--r--package/network/services/hostapd/files/hostapd.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh
index 6a830dfad1..24fc7c3cca 100644
--- a/package/network/services/hostapd/files/hostapd.sh
+++ b/package/network/services/hostapd/files/hostapd.sh
@@ -815,6 +815,13 @@ hostapd_set_bss_options() {
set_default r0_key_lifetime 10000
set_default pmk_r1_push 0
+ [ -n "$r0kh" -a -n "$r1kh" ] || {
+ key=`echo -n "$mobility_domain/$auth_secret" | md5sum | awk '{print $1}'`
+
+ set_default r0kh "ff:ff:ff:ff:ff:ff,*,$key"
+ set_default r1kh "00:00:00:00:00:00,00:00:00:00:00:00,$key"
+ }
+
[ -n "$r1_key_holder" ] && append bss_conf "r1_key_holder=$r1_key_holder" "$N"
append bss_conf "r0_key_lifetime=$r0_key_lifetime" "$N"
append bss_conf "pmk_r1_push=$pmk_r1_push" "$N"