From owner-freebsd-bugs@FreeBSD.ORG Thu Jun 21 16:40:12 2007 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9C51916A469 for ; Thu, 21 Jun 2007 16:40:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 7ED3113C469 for ; Thu, 21 Jun 2007 16:40:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l5LGeCR4017708 for ; Thu, 21 Jun 2007 16:40:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l5LGeCZD017707; Thu, 21 Jun 2007 16:40:12 GMT (envelope-from gnats) Resent-Date: Thu, 21 Jun 2007 16:40:12 GMT Resent-Message-Id: <200706211640.l5LGeCZD017707@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Scot Hetzel Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 14FF816A400 for ; Thu, 21 Jun 2007 16:38:11 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [69.147.83.33]) by mx1.freebsd.org (Postfix) with ESMTP id EE46313C455 for ; Thu, 21 Jun 2007 16:38:10 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l5LGcA7r040271 for ; Thu, 21 Jun 2007 16:38:10 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id l5LGcArS040270; Thu, 21 Jun 2007 16:38:10 GMT (envelope-from nobody) Message-Id: <200706211638.l5LGcArS040270@www.freebsd.org> Date: Thu, 21 Jun 2007 16:38:10 GMT From: Scot Hetzel To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.0 Cc: Subject: conf/113915: ndis wireless driver fails to associate when interface set to WPA X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2007 16:40:12 -0000 >Number: 113915 >Category: conf >Synopsis: ndis wireless driver fails to associate when interface set to WPA >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jun 21 16:40:12 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Scot Hetzel >Release: 7.0-CURRENT >Organization: >Environment: FreeBSD hp010 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Tue Jun 19 01:49:53 CDT 2007 swhetzel@hp010:/usr/src/sys/amd64/compile/GENERIC amd64 >Description: When I try and boot a system with the NDIS interface configured as: ifconfig_ndis0="WPA DHCP" I see it continuously trying to get a DHCP address, but it fails. I found the problem is because wpa_supplicant is not realizing that it had successfully connected to the wireless network, so it continuously connects/disconnects. By starting /usr/sbin/ndis_events, then wpa_supplicant will associate, and the wireless network is accessible. hp010# dmesg | grep ndis ndis0: mem 0xc0204000-0xc0205fff irq 21 at device 2.0 on pci6 ndis0: [ITHREAD] ndis0: NDIS API version: 5.1 ndis0: using obsoleted if_watchdog interface ndis0: Ethernet address: 00:14:a5:72:68:64 >How-To-Repeat: set the NDIS interface to "WPA DHCP" and then reboot the system. >Fix: Start ndis_events before starting wpa_supplicant for NDIS interfaces. apply the attached patch which will start ndis_events when the NDIS interface is set for WPA. Updated files: etc/network.subr etc/rc.d/Makefile New file etc/rc.d/ndis_events Patch attached with submission follows: Index: etc/network.subr =================================================================== RCS file: /home/ncvs/src/etc/network.subr,v retrieving revision 1.180 diff -u -r1.180 network.subr --- etc/network.subr 23 May 2007 00:18:44 -0000 1.180 +++ etc/network.subr 21 Jun 2007 15:53:12 -0000 @@ -52,6 +52,11 @@ if [ $_cfg -ne 0 ] ; then ifconfig $1 up fi + case $1 in + ndis*) + /etc/rc.d/ndis_events start + ;; + esac /etc/rc.d/wpa_supplicant start $1 _cfg=0 # XXX: not sure this should count fi @@ -80,6 +85,11 @@ if wpaif $1; then /etc/rc.d/wpa_supplicant stop $1 + case $1 in + ndis*) + /etc/rc.d/ndis_events stop + ;; + esac _cfg=0 fi Index: etc/rc.d/Makefile =================================================================== RCS file: /home/ncvs/src/etc/rc.d/Makefile,v retrieving revision 1.81 diff -u -r1.81 Makefile --- etc/rc.d/Makefile 9 Apr 2007 19:21:27 -0000 1.81 +++ etc/rc.d/Makefile 21 Jun 2007 15:33:26 -0000 @@ -23,7 +23,7 @@ ldconfig local localpkg lpd \ mixer motd mountcritlocal mountcritremote mountlate \ mdconfig mdconfig2 mountd moused mroute6d mrouted msgs \ - named natd netif netoptions \ + named natd netif ndis_events netoptions \ network_ipv6 newsyslog nfsclient nfsd \ nfslocking nfsserver nisdomain nsswitch ntpd ntpdate \ othermta \ Index: etc/rc.d/ndis_events =================================================================== RCS file: etc/rc.d/ndis_events diff -N etc/rc.d/ndis_events --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ etc/rc.d/ndis_events 21 Jun 2007 15:35:44 -0000 @@ -0,0 +1,19 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: ndis_events +# REQUIRE: mountcritremote +# BEFORE: wpa_supplicant +# KEYWORD: nojail nostart + +. /etc/rc.subr +. /etc/network.subr + +name="ndis_events" +rcvar= +command="/usr/sbin/${name}" + +load_rc_config $name +run_rc_command "$1" >Release-Note: >Audit-Trail: >Unformatted: