File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818#include <linux/nl80211.h>
1919#include <linux/rtnetlink.h>
2020#include <linux/version.h>
21+ #include <sys/socket.h>
2122#include <net/ethernet.h>
2223#include <net/if.h>
2324#include <pwd.h>
@@ -4067,15 +4068,19 @@ nla->nla_len = 8;
40674068nla -> nla_type = NL80211_ATTR_IFTYPE ;
40684069* (u32 * )nla_data (nla ) = NL80211_IFTYPE_MONITOR ;
40694070i += 8 ;
4070- if (((ifakttype & IFTYPEMONACT ) == IFTYPEMONACT ) && (activemonitorflag == true))
4071- {
4072- nla = (struct nlattr * )(nltxbuffer + i );
4073- nla -> nla_len = 8 ;
4074- nla -> nla_type = NL80211_ATTR_MNTR_FLAGS ;
4075- nla = (struct nlattr * )nla_data (nla );
4076- nla -> nla_len = 4 ;
4077- nla -> nla_type = NL80211_MNTR_FLAG_ACTIVE ;
4078- i += 8 ;
4071+ if (activemonitorflag == true)
4072+ {
4073+ if ((ifakttype & IFTYPEMONACT ) == IFTYPEMONACT )
4074+ {
4075+ nla = (struct nlattr * )(nltxbuffer + i );
4076+ nla -> nla_len = 8 ;
4077+ nla -> nla_type = NL80211_ATTR_MNTR_FLAGS ;
4078+ nla = (struct nlattr * )nla_data (nla );
4079+ nla -> nla_len = 4 ;
4080+ nla -> nla_type = NL80211_MNTR_FLAG_ACTIVE ;
4081+ i += 8 ;
4082+ }
4083+ else fprintf (stderr , "\nWarning: active monitor mode requested by user, but not supported by driver!\n" );
40794084 }
40804085nlh -> nlmsg_len = i ;
40814086if ((write (fd_socket_nl , nltxbuffer , i )) != i ) return false;
You can’t perform that action at this time.
0 commit comments