const char *phase1;
const char *pac_file;
uint16_t ieee80211w;
+ unsigned int keymgmt;
const char *connector;
const char *c_sign_key;
const char *net_access_key;
*network);
void *g_supplicant_network_get_bssid_list(GSupplicantNetwork *network);
GSupplicantPhy_mode g_supplicant_network_get_phy_mode(GSupplicantNetwork *network);
+dbus_bool_t g_supplicant_network_get_transition_mode(GSupplicantNetwork *network);
+const unsigned char *g_supplicant_network_get_transition_mode_bssid(GSupplicantNetwork *network);
+const void *g_supplicant_network_get_transition_mode_ssid(GSupplicantNetwork *network,
+ unsigned int *transition_mode_ssid_len);
+
#endif
#if defined TIZEN_EXT
void g_supplicant_network_set_last_connected_bssid(GSupplicantNetwork *network, const unsigned char *bssid);
dbus_bool_t sae;
dbus_bool_t owe;
dbus_bool_t dpp;
+ dbus_bool_t owe_transition_mode;
+ unsigned int transition_mode_ssid_len;
+ unsigned char transition_mode_bssid[6];
+ unsigned char transition_mode_ssid[32];
#endif
};
GSList *vsie_list;
unsigned char country_code[COUNTRY_CODE_LENGTH];
GSupplicantPhy_mode phy_mode;
-#endif
-#if defined TIZEN_EXT
+ dbus_bool_t owe_transition_mode;
+ unsigned int transition_mode_ssid_len;
+ unsigned char transition_mode_bssid[6];
+ unsigned char transition_mode_ssid[32];
unsigned char last_connected_bssid[WIFI_BSSID_LEN_MAX];
GHashTable *assoc_reject_table;
#endif
return (const unsigned char *)network->best_bss->bssid;
}
+dbus_bool_t g_supplicant_network_get_transition_mode(GSupplicantNetwork *network)
+{
+ if (network == NULL)
+ return FALSE;
+
+ return network->owe_transition_mode;
+}
+
+
+const unsigned char *g_supplicant_network_get_transition_mode_bssid(GSupplicantNetwork *network)
+{
+ if (network == NULL)
+ return NULL;
+
+ return (const unsigned char *)network->transition_mode_bssid;
+}
+
+const void *g_supplicant_network_get_transition_mode_ssid(GSupplicantNetwork *network,
+ unsigned int *transition_mode_ssid_len)
+{
+ if (!network) {
+ *transition_mode_ssid_len = 0;
+ return NULL;
+ }
+
+ *transition_mode_ssid_len = network->transition_mode_ssid_len;
+ return network->transition_mode_ssid;
+}
unsigned int g_supplicant_network_get_maxrate(GSupplicantNetwork *network)
{
}
#if defined TIZEN_EXT
+ network->owe_transition_mode = bss->owe_transition_mode;
+ memcpy(network->transition_mode_ssid, bss->transition_mode_ssid, bss->transition_mode_ssid_len);
+ memcpy(network->transition_mode_bssid, bss->transition_mode_bssid, WIFI_BSSID_LEN_MAX);
+
network->keymgmt = bss->keymgmt;
if (g_slist_length(bss->vsie_list) > 0) {
unsigned int value;
int ie_len;
#if defined TIZEN_EXT
+ const unsigned char OWE_WFA_OUI[] = { 0x50, 0x6f, 0x9a, 0x1c };
int r_len, j;
unsigned char *rates = NULL;
unsigned char *ext_rates = NULL;
#if defined TIZEN_EXT
unsigned char *vsie;
int vsie_len = 0;
+
+ if(ie[0] == VENDOR_SPECIFIC_INFO && memcmp(ie+2, OWE_WFA_OUI, sizeof(OWE_WFA_OUI)) == 0) {
+ SUPPLICANT_DBG("IE: match vendor specific data : OWE Transition Mode");
+
+/*
+ Tag: Vendor Specific: Wi-Fi Alliance: OWE Transition Mode
+ Tag Number: Vendor Specific (221) -> ie[0]
+ Tag length: 26 -> ie[1]
+ OUI: 50:6f:9a (Wi-Fi Alliance) -> ie[2]
+ Vendor Specific OUI Type: 28 -> ie[5]
+ BSSID: 92:fd:f0:20:2b:09 -> ie[6]
+ SSID length: 15 -> ie[12]
+ SSID: Wi-Fi-5.2.3-owe -> ie[13]
+
+0000 dd 1a 50 6f 9a 1c 92 fd f0 20 2b 09 0f 57 69 2d ..Po..... +..Wi-
+0010 46 69 2d 35 2e 32 2e 33 2d 6f 77 65 Fi-5.2.3-owe
+
+*/
+ bss->owe_transition_mode = TRUE;
+ if (ie[1] >= 11) { // Tag length is at least up to ssid length position.
+ memcpy(bss->transition_mode_bssid, ie+6, WIFI_BSSID_LEN_MAX);
+ if (ie[12] > 0 && ie[12] < 32) {
+ memcpy(bss->transition_mode_ssid, ie+13, ie[12]);
+ bss->transition_mode_ssid_len = ie[12];
+ } else
+ bss->transition_mode_ssid_len = 0;
+ } else
+ bss->owe_transition_mode = FALSE;
+ continue;
+ }
+
if(ie[0] == VENDOR_SPECIFIC_INFO && memcmp(ie+2, WPS_OUI, sizeof(WPS_OUI)) != 0) {
SUPPLICANT_DBG("IE: match vendor specific data");
bss->security = G_SUPPLICANT_SECURITY_IEEE8021X;
else if (bss->sae)
bss->security = G_SUPPLICANT_SECURITY_SAE;
- else if (bss->owe)
+ else if (bss->owe || bss->owe_transition_mode)
bss->security = G_SUPPLICANT_SECURITY_OWE;
else if (bss->dpp)
bss->security = G_SUPPLICANT_SECURITY_DPP;
add_network_security_proto(dict, ssid);
break;
case G_SUPPLICANT_SECURITY_SAE:
- key_mgmt = "SAE";
+ if (ssid->keymgmt & G_SUPPLICANT_KEYMGMT_WPA_PSK)
+ key_mgmt = "SAE WPA-PSK"; // WFA (WPA3 & WPA2 Mixed -> WPA2 only)
+ else
+ key_mgmt = "SAE";
add_network_security_psk(dict, ssid);
break;
case G_SUPPLICANT_SECURITY_OWE:
ssid->ssid_len);
#if defined TIZEN_EXT
- if (ssid->bssid) {
+ bool owe_transition_mode = FALSE;
+ if ((ssid->security == G_SUPPLICANT_SECURITY_OWE) && !(ssid->keymgmt & G_SUPPLICANT_KEYMGMT_OWE))
+ owe_transition_mode = TRUE;
+
+ if (ssid->bssid && !owe_transition_mode) {
char *bssid = NULL;
bssid = g_try_malloc0(18);
if (bssid == NULL) {
const unsigned char *bssid);
unsigned char *connman_network_get_bssid(struct connman_network *network);
+int connman_network_set_transition_mode_bssid(struct connman_network *network,
+ const unsigned char *transition_mode_bssid);
+
+unsigned char *connman_network_get_transition_mode_bssid(struct connman_network *network);
+
+bool connman_network_check_transition_mode(struct connman_network *network1, struct connman_network *network2);
+
int connman_network_set_maxrate(struct connman_network *network,
unsigned int maxrate);
Name: connman
Version: 1.37
-Release: 41
+Release: 42
License: GPL-2.0+
Summary: Connection Manager
Url: http://connman.net
if(g_strcmp0(ssid->eap, "fast") == 0)
ssid->pac_file = g_strdup(WIFI_EAP_FAST_PAC_FILE);
+
+ ssid->keymgmt = connman_network_get_keymgmt(network);
#endif
if (connman_setting_get_bool("BackgroundScanning"))
bool wps_advertizing;
#if defined TIZEN_EXT
+ bool owe_transition_mode;
+ const unsigned char *transition_mode_ssid;
+ const unsigned char *transition_mode_bssid;
+ unsigned int transition_mode_ssid_len;
GSList *vsie_list = NULL;
const unsigned char *country_code;
ieee80211_modes_e phy_mode;
#if defined TIZEN_EXT
connman_network_set_bssid(network,
g_supplicant_network_get_bssid(supplicant_network));
+ owe_transition_mode = (bool)g_supplicant_network_get_transition_mode(supplicant_network);
+ connman_network_set_bool(network, "WiFi.TRANSITION_MODE", owe_transition_mode);
+ if (owe_transition_mode) {
+ transition_mode_ssid = (unsigned char *)g_supplicant_network_get_transition_mode_ssid(supplicant_network, &transition_mode_ssid_len);
+ connman_network_set_blob(network, "WiFi.TRANSITION_MODE_SSID",
+ transition_mode_ssid, transition_mode_ssid_len);
+ transition_mode_bssid = g_supplicant_network_get_transition_mode_bssid(supplicant_network);
+ connman_network_set_transition_mode_bssid(network, transition_mode_bssid);
+ }
connman_network_set_maxrate(network,
g_supplicant_network_get_maxrate(supplicant_network));
connman_network_set_enc_mode(network,
if (wifi->network) {
if (wifi->network == connman_network)
return;
-
+#if TIZEN_EXT
+ unsigned int ssid_len;
+ DBG("network1 ssid[%s] , OWE[%d],ssid[%s]",
+ (char *)connman_network_get_blob(wifi->network,"WiFi.SSID", &ssid_len),
+ connman_network_get_bool(wifi->network,"WiFi.TRANSITION_MODE"),
+ (char *)connman_network_get_blob(wifi->network,"WiFi.TRANSITION_MODE_SSID", &ssid_len));
+
+ DBG("network1 ssid[%s], OWE[%d], ssid[%s]",
+ (char *)connman_network_get_blob(connman_network,"WiFi.SSID",&ssid_len),
+ connman_network_get_bool(connman_network,"WiFi.TRANSITION_MODE"),
+ (char *)connman_network_get_blob(connman_network,"WiFi.TRANSITION_MODE_SSID", &ssid_len));
+ if (connman_network_check_transition_mode(wifi->network, connman_network)) {//OWE trasition mode check
+ DBG("OWE transition mode is TRUE");
+ return;
+ }
+#endif
/*
* This should never happen, we got associated with
* a network different than the one we were expecting.
#if defined TIZEN_EXT
unsigned char last_connected_bssid[WIFI_BSSID_LEN_MAX];
GHashTable *assoc_reject_table;
+ bool owe_transition_mode;
+ void *transition_mode_ssid;
+ int transition_mode_ssid_len;
+ unsigned char transition_mode_bssid[WIFI_BSSID_LEN_MAX];
#endif
} wifi;
return (unsigned char *)network->wifi.bssid;
}
+int connman_network_set_transition_mode_bssid(struct connman_network *network,
+ const unsigned char *transition_mode_bssid)
+{
+ int i = 0;
+
+ if (transition_mode_bssid == NULL)
+ return -EINVAL;
+
+ for (;i < WIFI_BSSID_LEN_MAX;i++)
+ network->wifi.transition_mode_bssid[i] = transition_mode_bssid[i];
+
+ return 0;
+}
+
+unsigned char *connman_network_get_transition_mode_bssid(struct connman_network *network)
+{
+ return (unsigned char *)network->wifi.transition_mode_bssid;
+}
+
+bool connman_network_check_transition_mode(struct connman_network *network1, struct connman_network *network2)
+{
+
+ if (network1 == NULL || network2 == NULL)
+ return FALSE;
+
+ if (network1->wifi.owe_transition_mode == FALSE || network2->wifi.owe_transition_mode == FALSE)
+ return FALSE;
+
+ if ((memcmp(network1->wifi.bssid, network2->wifi.transition_mode_bssid, WIFI_BSSID_LEN_MAX) == 0)
+ && (memcmp(network1->wifi.transition_mode_bssid, network2->wifi.bssid, WIFI_BSSID_LEN_MAX) == 0))
+ return TRUE;
+ else
+ return FALSE;
+}
+
int connman_network_set_maxspeed(struct connman_network *network,
int maxspeed)
{
network->default_internet = value;
else if (g_strcmp0(key, "WiFi.HS20AP") == 0)
network->wifi.isHS20AP = value;
+ else if (g_strcmp0(key, "WiFi.TRANSITION_MODE") == 0)
+ network->wifi.owe_transition_mode = value;
#endif
return -EINVAL;
return network->default_internet;
else if (g_str_equal(key, "WiFi.HS20AP"))
return network->wifi.isHS20AP;
+ else if (g_strcmp0(key, "WiFi.TRANSITION_MODE"))
+ return network->wifi.owe_transition_mode;
#endif
return false;
network->wifi.ssid_len = size;
} else
network->wifi.ssid_len = 0;
+#ifdef TIZEN_EXT
+ } else if (g_str_equal(key, "WiFi.TRANSITION_MODE_SSID")) {
+ g_free(network->wifi.transition_mode_ssid);
+ network->wifi.transition_mode_ssid = g_try_malloc(size);
+ if (network->wifi.transition_mode_ssid) {
+ memcpy(network->wifi.transition_mode_ssid, data, size);
+ network->wifi.transition_mode_ssid_len = size;
+ } else
+ network->wifi.transition_mode_ssid_len = 0;
+#endif
} else {
return -EINVAL;
}
if (size)
*size = network->wifi.ssid_len;
return network->wifi.ssid;
+#ifdef TIZEN_EXT
+ } else if (g_str_equal(key, "WiFi.TRANSITION_MODE_SSID")) {
+ if (size)
+ *size = network->wifi.transition_mode_ssid_len;
+ return network->wifi.transition_mode_ssid;
+#endif
}
-
return NULL;
}