if (nl80211_get_mode(ifname, &mode))
return 0;
- if (mode != IWINFO_OPMODE_CLIENT && mode != IWINFO_OPMODE_ADHOC)
+ if (mode != IWINFO_OPMODE_CLIENT &&
+ mode != IWINFO_OPMODE_ADHOC &&
+ mode != IWINFO_OPMODE_MESHPOINT)
return 0;
sock = nl80211_wpactl_connect(ifname, &local);
static int nl80211_get_encryption(const char *ifname, char *buf)
{
char *p;
+ int opmode;
uint8_t wpa_version = 0;
char wpa[2], wpa_key_mgmt[64], wpa_pairwise[16], wpa_groupwise[16];
char auth_algs[2], wep_key0[27], wep_key1[27], wep_key2[27], wep_key3[27];
+ char mode[16];
struct iwinfo_crypto_entry *c = (struct iwinfo_crypto_entry *)buf;
if (nl80211_wpactl_query(ifname,
"pairwise_cipher", wpa_pairwise, sizeof(wpa_pairwise),
"group_cipher", wpa_groupwise, sizeof(wpa_groupwise),
- "key_mgmt", wpa_key_mgmt, sizeof(wpa_key_mgmt)))
+ "key_mgmt", wpa_key_mgmt, sizeof(wpa_key_mgmt),
+ "mode", mode, sizeof(mode)))
{
/* WEP or Open */
if (!strcmp(wpa_key_mgmt, "NONE"))
}
}
+ /* MESH with SAE */
+ else if (!strcmp(mode, "mesh") && !strcmp(wpa_key_mgmt, "UNKNOWN"))
+ {
+ c->enabled = 1;
+ c->wpa_version = 4;
+ c->auth_suites = IWINFO_KMGMT_SAE;
+ c->pair_ciphers = IWINFO_CIPHER_CCMP;
+ c->group_ciphers = IWINFO_CIPHER_CCMP;
+ }
+
/* WPA */
else
{
return 0;
}
+ /* Ad-Hoc or Mesh interfaces without wpa_supplicant are open */
+ else if (!nl80211_get_mode(ifname, &opmode) &&
+ (opmode == IWINFO_OPMODE_ADHOC ||
+ opmode == IWINFO_OPMODE_MESHPOINT))
+ {
+ c->enabled = 0;
+
+ return 0;
+ }
+
+
return -1;
}