From owner-freebsd-current@FreeBSD.ORG Sun Dec 12 04:51:00 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B97B116A4CE for ; Sun, 12 Dec 2004 04:51:00 +0000 (GMT) Received: from ebb.errno.com (ebb.errno.com [66.127.85.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id 369FC43D53 for ; Sun, 12 Dec 2004 04:51:00 +0000 (GMT) (envelope-from sam@errno.com) Received: from [66.127.85.90] ([66.127.85.90]) (authenticated bits=0) by ebb.errno.com (8.12.9/8.12.6) with ESMTP id iBC4oxWi046021 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 11 Dec 2004 20:50:59 -0800 (PST) (envelope-from sam@errno.com) Message-ID: <41BBCE36.9000201@errno.com> Date: Sat, 11 Dec 2004 20:51:02 -0800 From: Sam Leffler Organization: Errno Consulting User-Agent: Mozilla Thunderbird 1.0 (Macintosh/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Pawel Worach References: <200412081109.43840.sam@errno.com> <20041209.100008.21874313.rushani@bl.mmtr.or.jp> <200412081744.27539.sam@errno.com> <20041209.225041.63112571.rushani@bl.mmtr.or.jp> <41B9454F.9080903@errno.com> <41BA4B22.5070403@telia.com> <41BB8550.30208@errno.com> <41BBA53B.9070006@telia.com> In-Reply-To: <41BBA53B.9070006@telia.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-current@freebsd.org Subject: Re: WEP does not work? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Dec 2004 04:51:00 -0000 Pawel Worach wrote: > I enabled 802.11 crypto debug and did the procedure again. > > # ifconfig ath0 wepmode on wepkey 1:0xXXXX78e6XXXXdbe2XXXX0127XX > # ifconfig ath0 > ath0: flags=8843 mtu 1500 > inet 192.168.1.200 netmask 0xffffff00 broadcast 192.168.1.255 > inet6 fe80::205:4eff:fe4b:7613%ath0 prefixlen 64 scopeid 0x2 > ether 00:05:4e:4b:76:13 > media: IEEE 802.11 Wireless Ethernet autoselect > (autoselect ) > status: associated > ssid cookie channel 7 bssid fa:02:57:01:13:00 > authmode OPEN privacy ON > wepkey 1:104-bit > txpowmax 34 protmode CTS wme bintval 100 > > (just to demonstrate my last paragraph, the disappearing wepkey) > # ifconfig ath0 wepmode on > # ifconfig ath0 > ath0: flags=8843 mtu 1500 > inet 192.168.1.200 netmask 0xffffff00 broadcast 192.168.1.255 > inet6 fe80::205:4eff:fe4b:7613%ath0 prefixlen 64 scopeid 0x2 > ether 00:05:4e:4b:76:13 > media: IEEE 802.11 Wireless Ethernet autoselect > (autoselect ) > status: no carrier > ssid cookie > authmode OPEN privacy ON txpowmax 0 wme > > Now it's gone. So wepmode and wepkeys need to be configured in one shot? > After this kernel says: "[00:40:96:42:0d:9c] key (id 0) is invalid" The 802.11 state machine is being clocked when you do this and clearing the global key state when it goes through the INIT state (80211debug +state will show you). I added this just recently to insure key state was cleared when a device was marked down but on reflection it was a bad idea. The following change will revert this: Index: ieee80211_proto.c =================================================================== RCS file: /home/ncvs/src/sys/net80211/ieee80211_proto.c,v retrieving revision 1.10 diff -u -r1.10 ieee80211_proto.c --- ieee80211_proto.c 8 Dec 2004 17:26:47 -0000 1.10 +++ ieee80211_proto.c 12 Dec 2004 04:47:30 -0000 @@ -895,7 +895,6 @@ ic->ic_mgt_timer = 0; IF_DRAIN(&ic->ic_mgtq); ieee80211_reset_bss(ic); - ieee80211_crypto_delglobalkeys(ic); break; } if (ic->ic_auth->ia_detach != NULL) I'll think some more about the problem but probably just do the above. Sam