Skip to content

Commit

Permalink
warn if WIRELESS EXTENSIONS are not present, but do not terminate
Browse files Browse the repository at this point in the history
  • Loading branch information
ZerBea committed Mar 7, 2023
1 parent 2367371 commit bfcb216
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions hcxdumptool.c
Original file line number Diff line number Diff line change
Expand Up @@ -7084,14 +7084,10 @@ memset(&iwr, 0, sizeof(iwr));
memcpy(&iwr.ifr_name, interfacename, IFNAMSIZ);
if(ioctl(fd_socket, SIOCGIWNAME, &iwr) < 0)
{
perror("failed to detect wlan interface - possible reason:\ninterface not connected\ndriver/kernel does not support WIRLESS EXTENSIONS)");
if(forceinterfaceflag == false) return false;
}
if(strncmp(protocol80211, iwr.u.name, IF_NAMESIZE) != 0)
{
fprintf(stderr, "this driver does not support WIRELESS EXTENSIONS\nplease try hcxlabtool: https://github.com/ZerBea/wifi_laboratory\n");
perror("failed to detect wlan interface");
return false;
}
if(strncmp(protocol80211, iwr.u.name, IF_NAMESIZE) != 0) fprintf(stderr, "warning this driver does not support WIRELESS EXTENSIONS\nplease try hcxlabtool: https://github.com/ZerBea/wifi_laboratory\n");
memcpy(&interfaceprotocol, iwr.u.name, IFNAMSIZ);
if(bpf.len > 0)
{
Expand Down

0 comments on commit bfcb216

Please sign in to comment.