[lfs-patches] r3439 - trunk/wireless-tools

bdubbs at higgs.linuxfromscratch.org bdubbs at higgs.linuxfromscratch.org
Sat Sep 3 12:43:50 PDT 2016


Author: bdubbs
Date: Sat Sep  3 12:43:50 2016
New Revision: 3439

Log:
Add wireless tools patch

Added:
   trunk/wireless-tools/
   trunk/wireless-tools/wireless_tools-29-fix_iwlist_scanning-1.patch

Added: trunk/wireless-tools/wireless_tools-29-fix_iwlist_scanning-1.patch
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/wireless-tools/wireless_tools-29-fix_iwlist_scanning-1.patch	Sat Sep  3 12:43:50 2016	(r3439)
@@ -0,0 +1,32 @@
+Submitted By: Munir Contractor <munircontractor at gmail dot com>
+Date: 2016-09-03
+Initial Package Version: 29
+Upstream Status: From Upstream
+Origin: Arch Linux https://bugs.archlinux.org/task/15363
+Description: This patch fixes an issue where iwlist scan is not able to print the
+             wireless network names if there are too many networks due to buffer
+             allocation exceeding 65536.
+
+
+diff -Naur wireless_tools.29.orig/iwlist.c wireless_tools.29/iwlist.c
+--- wireless_tools.29.orig/iwlist.c	2007-06-30 01:11:09.000000000 +0000
++++ wireless_tools.29/iwlist.c	2016-09-03 17:51:56.703353035 +0000
+@@ -799,7 +799,7 @@
+ 	  if(iw_get_ext(skfd, ifname, SIOCGIWSCAN, &wrq) < 0)
+ 	    {
+ 	      /* Check if buffer was too small (WE-17 only) */
+-	      if((errno == E2BIG) && (range.we_version_compiled > 16))
++	      if((errno == E2BIG) && (range.we_version_compiled > 16) && (buflen < 65535))
+ 		{
+ 		  /* Some driver may return very large scan results, either
+ 		   * because there are many cells, or because they have many
+@@ -815,6 +815,9 @@
+ 		  else
+ 		    buflen *= 2;
+ 
++                  if(buflen > 65535)
++                    buflen = 65535;
++
+ 		  /* Try again */
+ 		  goto realloc;
+ 		}


More information about the patches mailing list