From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Jul 13 13:50:14 2005 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8EA4C16A41C for ; Wed, 13 Jul 2005 13:50:14 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA6F543D53 for ; Wed, 13 Jul 2005 13:50:13 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j6DDoD4T062457 for ; Wed, 13 Jul 2005 13:50:13 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j6DDoDco062454; Wed, 13 Jul 2005 13:50:13 GMT (envelope-from gnats) Resent-Date: Wed, 13 Jul 2005 13:50:13 GMT Resent-Message-Id: <200507131350.j6DDoDco062454@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Ulrich Spoerlein Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6576316A41C for ; Wed, 13 Jul 2005 13:48:38 +0000 (GMT) (envelope-from spoerlein@informatik.uni-wuerzburg.de) Received: from wrzx28.rz.uni-wuerzburg.de (wrzx28.rz.uni-wuerzburg.de [132.187.3.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9DCDB43D49 for ; Wed, 13 Jul 2005 13:48:37 +0000 (GMT) (envelope-from spoerlein@informatik.uni-wuerzburg.de) Received: from wrzx34.rz.uni-wuerzburg.de (wrzx34.rz.uni-wuerzburg.de [132.187.3.34]) by wrzx28.rz.uni-wuerzburg.de (Postfix) with ESMTP id A6BC4E168F for ; Wed, 13 Jul 2005 15:48:36 +0200 (CEST) Received: from virusscan (localhost [127.0.0.1]) by wrzx34.rz.uni-wuerzburg.de (Postfix) with ESMTP id 8BF2EB2EB3 for ; Wed, 13 Jul 2005 15:48:36 +0200 (CEST) Received: from wrzx28.rz.uni-wuerzburg.de (wrzx28.rz.uni-wuerzburg.de [132.187.3.28]) by wrzx34.rz.uni-wuerzburg.de (Postfix) with ESMTP id 597AFB2E76 for ; Wed, 13 Jul 2005 15:48:36 +0200 (CEST) Received: from frodo.galgenberg.net (wwsx14.win-screen.uni-wuerzburg.de [132.187.253.14]) by wrzx28.rz.uni-wuerzburg.de (Postfix) with ESMTP id 4867BE168F for ; Wed, 13 Jul 2005 15:48:36 +0200 (CEST) Received: from coyote.q.local (gb-21-237.galgenberg.net [172.16.21.237]) by frodo.galgenberg.net (8.13.1/8.13.1) with ESMTP id j6DDmZm7028622; Wed, 13 Jul 2005 15:48:35 +0200 (CEST) (envelope-from spoerlein@informatik.uni-wuerzburg.de) Received: from roadrunner.q.local (roadrunner.q.local [192.168.0.148]) by coyote.q.local (8.13.3/8.13.1) with ESMTP id j6DDmZZN083714; Wed, 13 Jul 2005 15:48:35 +0200 (CEST) (envelope-from q@roadrunner.q.local) Received: from roadrunner.q.local (localhost [127.0.0.1]) by roadrunner.q.local (8.13.4/8.13.3) with ESMTP id j6DDmZjp002742; Wed, 13 Jul 2005 15:48:35 +0200 (CEST) (envelope-from q@roadrunner.q.local) Received: (from q@localhost) by roadrunner.q.local (8.13.4/8.13.3/Submit) id j6DDmYIC002741; Wed, 13 Jul 2005 15:48:34 +0200 (CEST) (envelope-from q) Message-Id: <200507131348.j6DDmYIC002741@roadrunner.q.local> Date: Wed, 13 Jul 2005 15:48:34 +0200 (CEST) From: Ulrich Spoerlein To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/83381: [MAINTAINER] net/wmwifi: Unbreak with fwe or plip interfaces X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2005 13:50:14 -0000 >Number: 83381 >Category: ports >Synopsis: [MAINTAINER] net/wmwifi: Unbreak with fwe or plip interfaces >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Wed Jul 13 13:50:13 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Ulrich Spoerlein >Release: FreeBSD 6.0-CURRENT i386 >Organization: >Environment: System: FreeBSD roadrunner 6.0-CURRENT FreeBSD 6.0-CURRENT #1: Sun Jul 3 14:07:41 CEST >Description: The code walking the interface list will issue the SIOCGIFMEDIA ioctl to every interface. This ioctl will fail on if_fwe and if_plip (and probably others). Therefore make the failing ioctl() non-fatal and issue a warning only. Reported and tested by: martinko and Tuc at Beach House Generated with FreeBSD Port Tools 0.63 >How-To-Repeat: >Fix: --- wmwifi-0.4.patch begins here --- Index: files/patch-wireless.c =================================================================== RCS file: /home/ncvs/ports/net/wmwifi/files/patch-wireless.c,v retrieving revision 1.1 diff -u -u -r1.1 patch-wireless.c --- files/patch-wireless.c 7 Jul 2005 21:22:36 -0000 1.1 +++ files/patch-wireless.c 13 Jul 2005 13:44:24 -0000 @@ -1,5 +1,5 @@ ---- src/wireless.c.orig Sat Jul 2 14:41:48 2005 -+++ src/wireless.c Sat Jul 2 14:41:53 2005 +--- src/wireless.c.orig Tue Mar 9 20:39:17 2004 ++++ src/wireless.c Mon Jul 11 10:57:43 2005 @@ -143,6 +143,7 @@ max = get_max_ifs(); @@ -8,3 +8,28 @@ if (old > max) old = max; /* just be sure to not be out of bounds */ +@@ -193,9 +194,11 @@ + + if (ioctl(s, SIOCGIFMEDIA, (caddr_t) &ifmr) < 0) + { +- perror("ioctl"); ++ char str[128]; ++ snprintf(str, 128, "ioctl for interface %s failed", ifmr.ifm_name); + close(s); +- exit(1); ++ warn(str); ++ continue; + } + close(s); + /* we cannot monitor interfaces in hostap mode, so just +@@ -207,6 +210,10 @@ + found++; + } + } ++ ++ if (!found) ++ return -1; ++ + return index; + } + /* how many interfaces do we have? this includes non-wireless! */ Index: files/patch-wmwifi.c =================================================================== RCS file: /home/ncvs/ports/net/wmwifi/files/patch-wmwifi.c,v retrieving revision 1.1 diff -u -u -r1.1 patch-wmwifi.c --- files/patch-wmwifi.c 7 Jul 2005 21:22:36 -0000 1.1 +++ files/patch-wmwifi.c 13 Jul 2005 13:44:24 -0000 @@ -1,10 +1,35 @@ ---- src/wmwifi.c.orig Sat Jul 2 14:54:17 2005 -+++ src/wmwifi.c Sat Jul 2 14:54:21 2005 -@@ -67,6 +67,7 @@ +--- src/wmwifi.c.orig Mon Jul 11 10:58:32 2005 ++++ src/wmwifi.c Mon Jul 11 11:01:27 2005 +@@ -67,9 +67,11 @@ int ncolor = 0; struct wifi wfi; +- /* find a valid wireless interface */ + bzero(&wfi, sizeof(wfi)); - /* find a valid wireless interface */ ++ /* find a valid wireless interface */ #if __FreeBSD__ - wfi.ifnum = get_wlaniface(0, 1); +- wfi.ifnum = get_wlaniface(0, 1); ++ if ((wfi.ifnum = get_wlaniface(0, 1)) < 0) ++ errx(1, "No wireless interface found!"); + #else + wfi.ifnum = 0; + #endif +@@ -146,14 +148,16 @@ + break; + case Button2: + #ifdef __FreeBSD__ +- wfi.ifnum = get_wlaniface(wfi.ifnum, 1); ++ if ((wfi.ifnum = get_wlaniface(wfi.ifnum, 1)) < 0) ++ errx(1, "No wireless interface found!"); + #else + next_if(&wfi); + #endif + break; + case Button3: + #ifdef __FreeBSD__ +- wfi.ifnum = get_wlaniface(wfi.ifnum, -1); ++ if ((wfi.ifnum = get_wlaniface(wfi.ifnum, -1)) < 0) ++ errx(1, "No wireless interface found!"); + #else + prev_if(&wfi); + #endif --- wmwifi-0.4.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: