From john@stealth.jnielsen.net  Wed Jul 23 19:40:13 2008
Return-Path: <john@stealth.jnielsen.net>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 928381065674
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 23 Jul 2008 19:40:13 +0000 (UTC)
	(envelope-from john@stealth.jnielsen.net)
Received: from stealth.jnielsen.net (stealth.jnielsen.net [74.218.226.254])
	by mx1.freebsd.org (Postfix) with ESMTP id 551A98FC19
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 23 Jul 2008 19:40:13 +0000 (UTC)
	(envelope-from john@stealth.jnielsen.net)
Received: from stealth.jnielsen.net (jn@localhost [127.0.0.1])
	by stealth.jnielsen.net (8.14.2/8.14.2) with ESMTP id m6NJTYJ4033474;
	Wed, 23 Jul 2008 15:29:34 -0400 (EDT)
	(envelope-from john@stealth.jnielsen.net)
Received: (from john@localhost)
	by stealth.jnielsen.net (8.14.2/8.14.2/Submit) id m6NJTXNY033473;
	Wed, 23 Jul 2008 15:29:33 -0400 (EDT)
	(envelope-from john)
Message-Id: <200807231929.m6NJTXNY033473@stealth.jnielsen.net>
Date: Wed, 23 Jul 2008 15:29:33 -0400 (EDT)
From: John Nielsen <john@jnielsen.net>
Reply-To: John Nielsen <john@jnielsen.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc: john@jnielsen.net
Subject: [vap] second hostap interface (wlan1) unable to send traffic
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         125906
>Category:       kern
>Synopsis:       [vap] second hostap interface (wlan1) unable to send traffic
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    sam
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 23 19:50:01 UTC 2008
>Closed-Date:    Tue Dec 30 17:35:01 UTC 2008
>Last-Modified:  Tue Jan 20 21:50:01 UTC 2009
>Originator:     John Nielsen
>Release:        FreeBSD 8.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD stealth.jnielsen.net 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Mon Jul 21 03:24:10 EDT 2008 john@stealth.jnielsen.net:/usr/obj/usr/src8/src/sys/STEALTH i386


	
>Description:

When trying to set up a second (virtual) access point, I am able to create and configure the wlan1 interface and clients can see the SSID and associate to the network. The AP seems to receive traffic just fine, but is unable to send traffic over the interface. The first vap works fine.

A ping example:
stealth# ping 192.168.103.240
PING 192.168.103.240 (192.168.103.240): 56 data bytes
ping: sendto: Network is down

Log entries from dhcpd (it gets the request but can't send a reply):
Jul 22 10:11:13 stealth dhcpd: DHCPDISCOVER from 00:1b:77:9d:ab:ba 
(jnielsengl1830) via wlan1
Jul 22 10:11:13 stealth dhcpd: DHCPOFFER on 192.168.103.240 to 
00:1b:77:9d:ab:ba (jnielsengl1830) via wlan1
Jul 22 10:11:13 stealth dhcpd: send_packet: Network is down

The problem seems to follow the second hostap device configured (e.g. wlan1). I've tested with ipfw turned off via sysctl and with and without hidessid and bgscan on both interfaces. I've also tried disabling WEP. Details of my setup:

(D-Link DWL-G520 PCI card)
ath_hal: 0.9.20.3 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)
ath0: <Atheros 5212> mem 0xe5040000-0xe504ffff irq 16 at device 8.0 on 
pci0
ath0: [ITHREAD]
ath0: WARNING: using obsoleted if_watchdog interface
ath0: mac 5.6 phy 4.1 radio 4.5

stealth# egrep "ath|wlan" /etc/rc.conf | grep -v "^#"
wlans_ath0="wlan0 wlan1"
create_args_wlan0="wlanmode hostap"
create_args_wlan1="wlanmode hostap wlanaddr 10:0d:88:a6:61:a8"
ifconfig_wlan0="inet 192.168.3.10 netmask 255.255.255.0 ssid sixten wepmode on deftxkey 1 wepkey 1:0x[26 digit hex key]"
ifconfig_wlan1="inet 192.168.103.1 netmask 255.255.255.0 ssid freewifi wepmode off"

stealth# ifconfig ath0 && ifconfig wlan0 && ifconfig wlan1
ath0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
	ether 00:0d:88:a6:61:a8
	media: IEEE 802.11 Wireless Ethernet autoselect mode 11g <hostap>
	status: running
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	ether 00:0d:88:a6:61:a8
	inet 192.168.3.10 netmask 0xffffff00 broadcast 192.168.3.255
	media: IEEE 802.11 Wireless Ethernet autoselect mode 11g <hostap>
	status: running
	ssid sixten channel 6 (2437 Mhz 11g) bssid 00:0d:88:a6:61:a8
	regdomain FCC indoor ecm authmode OPEN privacy ON deftxkey 1
	wepkey 1:104-bit txpower 19 scanvalid 60 protmode CTS wme burst ff
	dturbo dtimperiod 1 -dfs
wlan1: flags=8c43<UP,BROADCAST,RUNNING,OACTIVE,SIMPLEX,MULTICAST> metric 0 mtu 1500
	ether 10:0d:88:a6:61:a8
	inet 192.168.103.1 netmask 0xffffff00 broadcast 192.168.103.255
	media: IEEE 802.11 Wireless Ethernet autoselect mode 11g <hostap>
	status: running
	ssid freewifi channel 6 (2437 Mhz 11g) bssid 10:0d:88:a6:61:a8
	regdomain FCC indoor ecm authmode OPEN privacy OFF txpower 19
	scanvalid 60 protmode CTS wme burst ff dturbo dtimperiod 1 -dfs


>How-To-Repeat:
	See description.
>Fix:

	


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Wed Jul 23 21:08:52 UTC 2008 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=125906 
Responsible-Changed-From-To: freebsd-net->sam 
Responsible-Changed-By: sam 
Responsible-Changed-When: Thu Jul 24 05:21:31 UTC 2008 
Responsible-Changed-Why:  
I promised to look at this 

http://www.freebsd.org/cgi/query-pr.cgi?pr=125906 

From: John Nielsen <john@jnielsen.net>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: kern/125906: [vap] second hostap interface (wlan1) unable to send traffic
Date: Tue, 18 Nov 2008 01:05:37 -0500

 This problem is still evident with an updated HAL on a system built from 
 today's HEAD.
 
 %dmesg|grep ath
 ath_hal: 0.10.5.10 (AR5210, AR5211, AR5212, AR5416, RF5111, RF5112, 
 RF2413, RF5413, RF2133, RF2425, RF2417)
 ath0: <Atheros 5212> mem 0xe5040000-0xe504ffff irq 16 at device 8.0 on 
 pci0
 ath0: [ITHREAD]
 ath0: WARNING: using obsoleted if_watchdog interface
 ath0: mac 5.6 phy 4.1 radio 4.5
 %uname -a
 FreeBSD stealth.jnielsen.net 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Mon Nov 
 17 22:59:22 EST 2008     
 john@stealth.jnielsen.net:/usr/obj/usr/src8/src/sys/STEALTH  i386
State-Changed-From-To: open->closed 
State-Changed-By: sam 
State-Changed-When: Tue Dec 30 17:33:51 UTC 2008 
State-Changed-Why:  
fixed by r186144 

http://www.freebsd.org/cgi/query-pr.cgi?pr=125906 

From: John Nielsen <john@jnielsen.net>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: kern/125906: [vap] second hostap interface (wlan1) unable to send traffic
Date: Tue, 20 Jan 2009 16:33:02 -0500

 Thanks Sam. I tested again using the same setup and yesterday's -HEAD. 
 Unfortunately I'm still not able to send anything over the second vap. 
 Now it appears that the interface also doesn't receive anything, as I no 
 longer get messages from dhcpd.
 
 Wireless association works fine. Arp works fine. The first vap works fine. 
 If I switch the order of the vap's the problem remains with the one 
 configured last.
 
 When trying to ping the local interface (or a remote IP on the wlan1 
 subnet) I get "no buffer space" or "network is down".
 
 JN
 
>Unformatted:
