Browse Source

nfqws: fix broken wifi ssid update

pull/2096/head
bol-van 4 months ago
parent
commit
7eb195e533
  1. 5
      docs/changes.txt
  2. 1
      nfq/darkmagic.c
  3. 4
      nfq/nfqws.c
  4. 3
      nfq/params.h

5
docs/changes.txt

@ -600,3 +600,8 @@ nfqws: fix breaking tcp if ts fooling is enabled but no timestamps present
blockcheck: fix detection of http redirection if domain/URI specified blockcheck: fix detection of http redirection if domain/URI specified
install_easy: fix writing of ask_list variables install_easy: fix writing of ask_list variables
73.10
* nfqws2: fix broken wifi ssid update
* minor AI fixes

1
nfq/darkmagic.c

@ -2096,6 +2096,7 @@ static bool scan_info(struct mnl_socket* nl, uint16_t wlan_family_id, struct wla
// wlan_info does not return ssid since kernel 5.19 // wlan_info does not return ssid since kernel 5.19
// it's used to enumerate all wifi interfaces then call scan_info on each // it's used to enumerate all wifi interfaces then call scan_info on each
if (!wlan_info(nl, wlan_family_id, &wc_all, false)) return false; if (!wlan_info(nl, wlan_family_id, &wc_all, false)) return false;
w->count=0;
for(int i=0;i<wc_all.count;i++) for(int i=0;i<wc_all.count;i++)
if (!netlink_genl_simple_transact(nl, wlan_family_id, NLM_F_REQUEST | NLM_F_ACK | NLM_F_DUMP, NL80211_CMD_GET_SCAN, 0, scan_prepare, (void*)&wc_all.wlan[i].ifindex, scan_info_cb, w)) if (!netlink_genl_simple_transact(nl, wlan_family_id, NLM_F_REQUEST | NLM_F_ACK | NLM_F_DUMP, NL80211_CMD_GET_SCAN, 0, scan_prepare, (void*)&wc_all.wlan[i].ifindex, scan_info_cb, w))
return false; return false;

4
nfq/nfqws.c

@ -256,8 +256,6 @@ static bool nfq_init(struct nfq_handle **h, struct nfq_q_handle **qh)
// dot not fail. not supported on old linuxes <3.6 // dot not fail. not supported on old linuxes <3.6
} }
nfnl_rcvbufsiz(nfq_nfnlh(*h), Q_RCVBUF);
DLOG_CONDUP("initializing raw sockets bind-fix4=%u bind-fix6=%u\n", params.bind_fix4, params.bind_fix6); DLOG_CONDUP("initializing raw sockets bind-fix4=%u bind-fix6=%u\n", params.bind_fix4, params.bind_fix6);
if (!rawsend_preinit(params.bind_fix4, params.bind_fix6)) if (!rawsend_preinit(params.bind_fix4, params.bind_fix6))
goto exiterr; goto exiterr;
@ -352,7 +350,7 @@ static int nfq_main(void)
if (rd) if (rd)
{ {
int r = nfq_handle_packet(h, (char *)buf, (int)rd); int r = nfq_handle_packet(h, (char *)buf, (int)rd);
if (r<0) DLOG_ERR("nfq_handle_packet result %d, errno %d : %s\n", r, errno, strerror(errno)); if (r) DLOG_ERR("nfq_handle_packet error %d\n", r);
} }
else else
DLOG("recv from nfq returned 0 !\n"); DLOG("recv from nfq returned 0 !\n");

3
nfq/params.h

@ -23,8 +23,7 @@
#define RAW_SNDBUF (64*1024) // in bytes #define RAW_SNDBUF (64*1024) // in bytes
#define Q_MAXLEN 4986 // in packets #define Q_MAXLEN 1024 // in packets
#define Q_RCVBUF (1024*1024) // in bytes
#define BADSEQ_INCREMENT_DEFAULT -10000 #define BADSEQ_INCREMENT_DEFAULT -10000
#define BADSEQ_ACK_INCREMENT_DEFAULT -66000 #define BADSEQ_ACK_INCREMENT_DEFAULT -66000

Loading…
Cancel
Save