[PATCH 07/12] mesh: Check mesh key management method
Masashi Honma
masashi.honma
Mon Nov 3 21:36:48 PST 2014
Signed-off-by: Natsuki Itaya <Natsuki.Itaya at jp.sony.com>
Signed-off-by: Masashi Honma <masashi.honma at gmail.com>
---
wpa_supplicant/config_file.c | 8 ++++++++
wpa_supplicant/ctrl_iface.c | 6 ++++++
2 files changed, 14 insertions(+)
diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c
index 6c55cfc..664745b 100644
--- a/wpa_supplicant/config_file.c
+++ b/wpa_supplicant/config_file.c
@@ -143,6 +143,14 @@ 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 32d6464..f9463fc 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -2401,6 +2401,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,
--
1.9.1
More information about the Hostap
mailing list