wireless-tools: increase max priv ioctl

This commit is contained in:
coolsnowwolf 2023-03-02 15:19:27 +08:00
parent ac34ab946b
commit 4e53878138
3 changed files with 35 additions and 1 deletions

View File

@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=wireless-tools
PKG_VERSION:=29
PKG_MINOR:=
PKG_RELEASE:=6
PKG_RELEASE:=7
PKG_SOURCE:=wireless_tools.$(PKG_VERSION)$(PKG_MINOR).tar.gz
PKG_SOURCE_URL:=https://hewlettpackard.github.io/wireless-tools

View File

@ -0,0 +1,23 @@
--- a/iwpriv.c
+++ b/iwpriv.c
@@ -259,7 +259,7 @@
int priv_num) /* Number of descriptions */
{
struct iwreq wrq;
- u_char buffer[4096]; /* Only that big in v25 and later */
+ u_char buffer[8192*2]; /* this buffer size for get_site_survey length */
int i = 0; /* Start with first command arg */
int k; /* Index in private description table */
int temp;
@@ -425,6 +425,11 @@
else
{
wrq.u.data.length = 0L;
+ if(0 == strcmp("get_site_survey", cmdname))
+ {
+ wrq.u.data.length = 120*128; // 120 is per entry size, 128 is counter of entry
+ fprintf(stderr, "(%d)cmdname %s\n",cmdname);
+ }
}
strncpy(wrq.ifr_name, ifname, IFNAMSIZ);

View File

@ -0,0 +1,11 @@
--- a/iwlib.c
+++ b/iwlib.c
@@ -650,7 +650,7 @@ iw_get_priv_info(int skfd,
else
maxpriv *= 2;
}
- while(maxpriv < 1000);
+ while(maxpriv <= 1024);
/* Cleanup */
if(priv)