mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 00:38:24 -05:00
Allow ENABLE_NETWORK to avoid automatic connection
Extra parameter "no-connect" can now be added to the ENABLE_NETWORK ctrl_iface command to avoid automatic connection to the enabled network. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
8b9d0bfa00
commit
84c78f9570
@ -1592,6 +1592,11 @@ static int wpa_supplicant_ctrl_iface_enable_network(
|
||||
"ENABLE_NETWORK with persistent P2P group");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (os_strstr(cmd, " no-connect")) {
|
||||
ssid->disabled = 0;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
wpa_supplicant_enable_network(wpa_s, ssid);
|
||||
|
||||
|
@ -1464,7 +1464,12 @@ static int wpa_cli_cmd_enable_network(struct wpa_ctrl *ctrl, int argc,
|
||||
return -1;
|
||||
}
|
||||
|
||||
res = os_snprintf(cmd, sizeof(cmd), "ENABLE_NETWORK %s", argv[0]);
|
||||
if (argc > 1)
|
||||
res = os_snprintf(cmd, sizeof(cmd), "ENABLE_NETWORK %s %s",
|
||||
argv[0], argv[1]);
|
||||
else
|
||||
res = os_snprintf(cmd, sizeof(cmd), "ENABLE_NETWORK %s",
|
||||
argv[0]);
|
||||
if (res < 0 || (size_t) res >= sizeof(cmd))
|
||||
return -1;
|
||||
cmd[sizeof(cmd) - 1] = '\0';
|
||||
|
Loading…
Reference in New Issue
Block a user