aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMasashi Honma <masashi.honma@gmail.com>2014-11-15 01:35:28 (GMT)
committerJouni Malinen <j@w1.fi>2014-11-16 17:43:11 (GMT)
commit0c6099f31bb736cc875ae15f9e6d34eb6309be94 (patch)
treec785cd7591f2ef8c9e35efac65aace7f6f059b77
parent44a1662a50061451068d780e017da699b1c8c672 (diff)
downloadhostap-0c6099f31bb736cc875ae15f9e6d34eb6309be94.zip
hostap-0c6099f31bb736cc875ae15f9e6d34eb6309be94.tar.gz
hostap-0c6099f31bb736cc875ae15f9e6d34eb6309be94.tar.bz2
mesh: Check mesh key management method
Signed-off-by: Natsuki Itaya <Natsuki.Itaya@jp.sony.com> Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
-rw-r--r--wpa_supplicant/config_file.c9
-rw-r--r--wpa_supplicant/ctrl_iface.c6
2 files changed, 15 insertions, 0 deletions
diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c
index 6c55cfc..246db0d 100644
--- a/wpa_supplicant/config_file.c
+++ b/wpa_supplicant/config_file.c
@@ -143,6 +143,15 @@ static int wpa_config_validate_network(struct wpa_ssid *ssid, int line)
ssid->group_cipher &= ~WPA_CIPHER_CCMP;
}
+ if (ssid->mode == WPAS_MODE_MESH &&
+ (ssid->key_mgmt != WPA_KEY_MGMT_NONE &&
+ ssid->key_mgmt != WPA_KEY_MGMT_SAE)) {
+ wpa_printf(MSG_ERROR,
+ "Line %d: key_mgmt for mesh network should be open or SAE",
+ line);
+ errors++;
+ }
+
return errors;
}
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 1e41962..b82f620 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -2388,6 +2388,12 @@ static int wpa_supplicant_ctrl_iface_mesh_group_add(
"CTRL_IFACE: Cannot use MESH_GROUP_ADD on a non mesh network");
return -1;
}
+ if (ssid->key_mgmt != WPA_KEY_MGMT_NONE &&
+ ssid->key_mgmt != WPA_KEY_MGMT_SAE) {
+ wpa_printf(MSG_ERROR,
+ "CTRL_IFACE: key_mgmt for mesh network should be open or SAE");
+ return -1;
+ }
/*
* TODO: If necessary write our own group_add function,