ports/98885: net/wmwifi could be quieter
Eric P. Scott
eps+pbug0606 at ana.com
Tue Jun 13 00:20:27 UTC 2006
>Number: 98885
>Category: ports
>Synopsis: net/wmwifi could be quieter
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Tue Jun 13 00:20:17 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Eric P. Scott
>Release: FreeBSD 6.1-RELEASE i386
>Organization:
ana-systems, Inc.
>Environment:
System: FreeBSD tools 6.1-RELEASE FreeBSD 6.1-RELEASE #0: Sun May 7 04:32:43 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386
>Description:
wmwifi [erroneously] attempts to access non-wireless network
interfaces, then complains when inappropriate ioctl()s fail. The
offending code appears in the FreeBSD port, not the original
distribution. Comments in CVS indicate this is a known problem.
>How-To-Repeat:
Execute wmwifi from a shell; middle- or right-click on its
window. A message like:
wmwifi: ioctl for interface plip0 failed: Invalid argument
will appear.
>Fix:
Instead of excluding lo0 by name, why not avoid all loopback and
point-to-point interfaces? While this isn't a complete solution,
it is an inexpensive "sanity check" that should provide a
noticeable improvement.
--- net/wmwifi/files/patch-wireless.c.orig Wed Jul 13 14:35:27 2005
+++ net/wmwifi/files/patch-wireless.c Sat Jun 10 15:52:31 2006
@@ -1,5 +1,5 @@
--- src/wireless.c.orig Tue Mar 9 20:39:17 2004
-+++ src/wireless.c Mon Jul 11 10:57:43 2005
++++ src/wireless.c Sun Jun 11 00:46:29 2006
@@ -143,6 +143,7 @@
max = get_max_ifs();
@@ -8,6 +8,17 @@
if (old > max)
old = max; /* just be sure to not be out of bounds */
+@@ -178,8 +179,8 @@
+ len = sizeof(ifmd);
+ sysctl(name, 6, &ifmd, &len, NULL, 0);
+
+- /* skip loopback interface */
+- if (!strcmp(ifmd.ifmd_name, "lo0"))
++ /* skip loopback and point-to-point interfaces */
++ if ((ifmd.ifmd_flags&(IFF_LOOPBACK|IFF_POINTOPOINT))!=0)
+ continue;
+
+ s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
@@ -193,9 +194,11 @@
if (ioctl(s, SIOCGIFMEDIA, (caddr_t) &ifmr) < 0)
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list