Cumulative patch from commit 8b48e3200680f71ae083b84793e6bdc2099416d2
8b48e32 wpa_cli: Add MAC address randomization in scan fb37588 ctrl_iface: Add MAC address randomization in scan processing 56c76fa scan: Add MAC address randomization in scan handling 86056fe nl80211: Handle MAC address randomization in scan/sched_scan ff23ed2 driver: Add definitions for MAC address randomization in scan 7db53bb wpa_cli: Implement TDLS start/cancel channel switching commands 72b2605 nl80211: Pass TDLS channel-switch start/stop params to kernel 6b90dea TDLS: Propagate enable/disable channel-switch commands to driver d9d3b78 TDLS: Track TDLS channel switch prohibition in BSS 4daa572 TDLS: Add channel-switch capability flag ca16586 Sync with wireless-testing.git include/uapi/linux/nl80211.h 8c42b36 WMM AC: Reconfigure tspecs on reassociation to the same BSS 677e7a9 WMM AC: Do not fail on unknown IEs in Association Response fecc2bb WMM AC: Delete tspecs on roaming 20fe745 WMM AC: Print user-priority in wmm_ac_status 730a0d1 nl80211: Always register management frames handler ... 209702d Add possibility to set the setband parameter ee82e33 Do not trigger the scan during initialization on Android platforms e69ae5f Reject new SCAN commands if there is a pending request ... 59d7148 nl80211: Provide subtype and reason code for AP SME drivers 9d4ff04 Add external EAPOL transmission option for testing purposes 61fc904 P2P: Handle improper WPS termination on GO during group formation 58b40fd P2P: Clear p2p_go_group_formation_completed on GO start c155305 Complete sme-connect radio work when clearing connection state debb2da P2P: Report group removal reason PSK_FAILURE in timeout case 51465a0 The master branch is now used for v2.4 development Change-Id: I9b9cfa5c5cd4d26b2f3f5595f7c226ac60de6258
This commit is contained in:
@@ -47,6 +47,7 @@ struct ctrl_iface_priv {
|
||||
struct wpa_supplicant *wpa_s;
|
||||
int sock;
|
||||
struct dl_list ctrl_dst;
|
||||
int android_control_socket;
|
||||
};
|
||||
|
||||
|
||||
@@ -54,6 +55,7 @@ struct ctrl_iface_global_priv {
|
||||
struct wpa_global *global;
|
||||
int sock;
|
||||
struct dl_list ctrl_dst;
|
||||
int android_control_socket;
|
||||
};
|
||||
|
||||
|
||||
@@ -270,7 +272,7 @@ static char * wpa_supplicant_ctrl_iface_path(struct wpa_supplicant *wpa_s)
|
||||
}
|
||||
|
||||
res = os_snprintf(buf, len, "%s/%s", dir, wpa_s->ifname);
|
||||
if (res < 0 || (size_t) res >= len) {
|
||||
if (os_snprintf_error(len, res)) {
|
||||
os_free(pbuf);
|
||||
os_free(buf);
|
||||
return NULL;
|
||||
@@ -340,8 +342,10 @@ static int wpas_ctrl_iface_open_sock(struct wpa_supplicant *wpa_s,
|
||||
os_snprintf(addr.sun_path, sizeof(addr.sun_path), "wpa_%s",
|
||||
wpa_s->conf->ctrl_interface);
|
||||
priv->sock = android_get_control_socket(addr.sun_path);
|
||||
if (priv->sock >= 0)
|
||||
if (priv->sock >= 0) {
|
||||
priv->android_control_socket = 1;
|
||||
goto havesock;
|
||||
}
|
||||
#endif /* ANDROID */
|
||||
if (os_strncmp(buf, "DIR=", 4) == 0) {
|
||||
dir = buf + 4;
|
||||
@@ -556,6 +560,16 @@ static int wpas_ctrl_iface_reinit(struct wpa_supplicant *wpa_s,
|
||||
if (priv->sock <= 0)
|
||||
return -1;
|
||||
|
||||
/*
|
||||
* On Android, the control socket being used may be the socket
|
||||
* that is created when wpa_supplicant is started as a /init.*.rc
|
||||
* service. Such a socket is maintained as a key-value pair in
|
||||
* Android's environment. Closing this control socket would leave us
|
||||
* in a bad state with an invalid socket descriptor.
|
||||
*/
|
||||
if (priv->android_control_socket)
|
||||
return priv->sock;
|
||||
|
||||
eloop_unregister_read_sock(priv->sock);
|
||||
close(priv->sock);
|
||||
priv->sock = -1;
|
||||
@@ -657,7 +671,7 @@ static void wpa_supplicant_ctrl_iface_send(struct wpa_supplicant *wpa_s,
|
||||
return;
|
||||
|
||||
res = os_snprintf(levelstr, sizeof(levelstr), "<%d>", level);
|
||||
if (res < 0 || (size_t) res >= sizeof(levelstr))
|
||||
if (os_snprintf_error(sizeof(levelstr), res))
|
||||
return;
|
||||
idx = 0;
|
||||
if (ifname) {
|
||||
@@ -870,6 +884,7 @@ static int wpas_global_ctrl_iface_open_sock(struct wpa_global *global,
|
||||
}
|
||||
wpa_printf(MSG_DEBUG, "Using Android control socket '%s'",
|
||||
ctrl + 9);
|
||||
priv->android_control_socket = 1;
|
||||
goto havesock;
|
||||
}
|
||||
|
||||
@@ -884,6 +899,7 @@ static int wpas_global_ctrl_iface_open_sock(struct wpa_global *global,
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"Using Android control socket '%s'",
|
||||
ctrl);
|
||||
priv->android_control_socket = 1;
|
||||
goto havesock;
|
||||
}
|
||||
}
|
||||
@@ -1064,6 +1080,16 @@ static int wpas_ctrl_iface_global_reinit(struct wpa_global *global,
|
||||
if (priv->sock <= 0)
|
||||
return -1;
|
||||
|
||||
/*
|
||||
* On Android, the control socket being used may be the socket
|
||||
* that is created when wpa_supplicant is started as a /init.*.rc
|
||||
* service. Such a socket is maintained as a key-value pair in
|
||||
* Android's environment. Closing this control socket would leave us
|
||||
* in a bad state with an invalid socket descriptor.
|
||||
*/
|
||||
if (priv->android_control_socket)
|
||||
return priv->sock;
|
||||
|
||||
eloop_unregister_read_sock(priv->sock);
|
||||
close(priv->sock);
|
||||
priv->sock = -1;
|
||||
|
||||
Reference in New Issue
Block a user