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>
This commit is contained in:
Masashi Honma 2014-11-15 10:35:28 +09:00 committed by Jouni Malinen
parent 44a1662a50
commit 0c6099f31b
2 changed files with 15 additions and 0 deletions

View file

@ -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;
}

View file

@ -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,