mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-02-26 13:49:35 -05:00
hostapd: Show more helpful message for -g and -G errors
Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
17b8995cf5
commit
cd61936a4a
@ -525,6 +525,8 @@ static int hostapd_get_global_ctrl_iface(struct hapd_interfaces *interfaces,
|
|||||||
return -1;
|
return -1;
|
||||||
pos = os_strrchr(interfaces->global_iface_path, '/');
|
pos = os_strrchr(interfaces->global_iface_path, '/');
|
||||||
if (pos == NULL) {
|
if (pos == NULL) {
|
||||||
|
wpa_printf(MSG_ERROR, "No '/' in the global control interface "
|
||||||
|
"file");
|
||||||
os_free(interfaces->global_iface_path);
|
os_free(interfaces->global_iface_path);
|
||||||
interfaces->global_iface_path = NULL;
|
interfaces->global_iface_path = NULL;
|
||||||
return -1;
|
return -1;
|
||||||
@ -614,10 +616,12 @@ int main(int argc, char *argv[])
|
|||||||
exit(1);
|
exit(1);
|
||||||
break;
|
break;
|
||||||
case 'g':
|
case 'g':
|
||||||
hostapd_get_global_ctrl_iface(&interfaces, optarg);
|
if (hostapd_get_global_ctrl_iface(&interfaces, optarg))
|
||||||
|
return -1;
|
||||||
break;
|
break;
|
||||||
case 'G':
|
case 'G':
|
||||||
hostapd_get_ctrl_iface_group(&interfaces, optarg);
|
if (hostapd_get_ctrl_iface_group(&interfaces, optarg))
|
||||||
|
return -1;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
usage();
|
usage();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user