Re: WEP does not work?

From: Pawel Worach <pawel.worach_at_telia.com>
Date: Sun, 12 Dec 2004 04:21:40 +0100
Sam Leffler wrote:
> Something is very wrong that you're getting all the watchdog timeouts. 
> Also there are many frames discarded that don't make sense.  The output 
> from 80211stats might be useful.  OTOH, as I said, adhoc mode for ath is 
> lightly tested so may just have a problem; it's very low priority and 
> likely won't get fixed real soon.
> 
>>
>> # ./athdebug +crypto
>> dev.ath.0.debug: 0x0
> 
> Sorry, athdebug +keycache is what you want.  Supplying -? as an arg to 
> either athdebug or 80211debug will display the possible debug bits.

Actually, looks like 'ifconfig ath0 wepmode on weptxkey 1 \
wepkey 1:0xXXXX78e6XXXXdbe2XXXX0127XX' changed the "deftxkey".
Where "weptxkey" and "deftxkey" mixed up along the way?
# ifconfig -v ath0
ath0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> 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 <adhoc> (autoselect 
<adhoc>)
         status: associated
         ssid cookie channel 7 bssid 1a:00:34:02:62:02
         authmode OPEN privacy ON deftxkey 1
         wepkey 1:104-bit <XXXX78e6XXXXdbe2XXXX0127XX>
         txpowmax 34 protmode CTS wme bintval 100
now I get these messages when trying to transmit data
[00:40:96:42:0d:9c] key (id 0) is invalid
[00:40:96:42:0d:9c] key (id 0) is invalid
[00:40:96:42:0d:9c] no default transmit key
[00:40:96:42:0d:9c] key (id 0) is invalid
[00:40:96:42:0d:9c] key (id 0) is invalid
[00:40:96:42:0d:9c] key (id 0) is invalid
[00:40:96:42:0d:9c] key (id 0) is invalid

With ath keycache debug on I see this after the following ifconfig command:
# ifconfig ath0 wepmode on weptxkey 1 wepkey 1:0xXXXX78e6XXXXdbe2XXXX0127XX
ath_init: if_flags 0x8843
ath_stop_locked: invalid 0 if_flags 0x8843
ath_key_update_begin:
ath_key_update_end:
ath_key_update_begin:
ath_key_delete: delete key 0
ath_key_delete: delete key 1
ath_key_delete: delete key 2
ath_key_delete: delete key 3
ath_key_update_end:
ath_initkeytable: reset key 0
ath_initkeytable: reset key 1
ath_initkeytable: reset key 2
ath_initkeytable: reset key 3
ath_start: ignore data packet, ath_start: ignore data packet, state 1
state 1
ath_init: if_flags 0x8843
ath_stop_locked: invalid 0 if_flags 0x8843
ath_key_update_begin:
ath_key_delete: delete key 0
ath_key_delete: delete key 1
ath_key_delete: delete key 2
ath_key_delete: delete key 3
ath_key_update_end:
ath_key_update_begin:
ath_key_update_end:
ath_initkeytable: reset key 0
ath_initkeytable: reset key 1
ath_initkeytable: reset key 2
ath_initkeytable: reset key 3
ath_start: ignore data packet, state 1ath_start: ignore data packet, state 1

ath_key_update_begin:
ath_keyset: [00] WEP     XXXX78e6XXXXdbe2XXXX0127XX mac 00:05:4e:4b:76:13
ath_key_update_end:
ath_start: ignore data packet, state 1
ath_start: ignore data packet, state 1
ath_start: ignore data packet, state 1
ath_start: ignore data packet, state 1
ath_start: ignore data packet, state 1
ath_start: ignore data packet, state 1
ath_start: ignore data packet, state 1
ath_start: ignore data packet, state 1
ath_start: ignore data packet, state 1
ath_start: ignore data packet, state 1
ath_start: ignore data packet, state 1
ath_start: ignore data packet, state 1
ath_start: ignore data packet, state 1
ath_start: ignore data packet, state 1
ath_start: ignore data packet, state 1
ath_start: ignore data packet, state 1
ath_start: ignore data packet, state 1
ath_start: ignore data packet, state 1
ath_start: ignore data packet, state 1
ath_start: ignore data packet, state 1
ath_start: ignore data packet, state 1
ath_start: ignore data packet, state 1
ath_start: ignore data packet, state 1
ath_start: ignore data packet, state 1
ath_start: ignore data packet, state 1
ath_start: ignore data packet, state 1
ath_start: ignore data packet, state 1
ath_start: ignore data packet, state 1
ath_start: ignore data packet, state 1
ath_start: ignore data packet, state 1
ath_start: ignore data packet, state 1
ath_key_update_begin:
ath_key_update_end:

Here are the 802.11 stats.
# ./80211stats
22 rx from wrong bssid
1 rx discard 'cuz dup
485338 rx discard mgt frames
487591 rx beacon frames
24 rx element unknown
234 rx frame chan mismatch
778 rx frame ssid mismatch
9 rx w/ incorrect keyid
21 active scans started
140 nodes timed out inactivity

When at the edge of giving up and sending the above I did one more test and
# arp -an
? (192.168.1.1) at 00:40:96:42:0d:9c on ath0 [ethernet]
ibm-se82151# ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1): 56 data bytes
64 bytes from 192.168.1.1: icmp_seq=0 ttl=64 time=1.640 ms
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=3.348 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=1.600 ms
^C
looks like "weptxkey" cut it so now it works in ad-hoc mode
with wep, lets try the AP again.... looks good
# ifconfig ath0 media autoselect mode autoselect
# ifconfig ath0 ssid my-ssid wepmode on weptxkey 1 wepkey \
1:0xXXXX78e6XXXXdbe2XXXX0127XX
# ifconfig -v ath0
ath0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> 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 (DS/11Mbps)
         status: associated
         ssid my-ssid channel 11 (2462) bssid 00:04:75:62:e9:0d
         authmode OPEN privacy ON deftxkey 1
         wepkey 1:104-bit <XXXX78e6XXXXdbe2XXXX0127XX> tx+rx+def
         powersavemode OFF powersavesleep 100 txpowmax 34 txpower 60
         rtsthreshold 2312 protmode CTS wme roaming AUTO bintval 100
# ping 192.168.1.3
PING 192.168.1.3 (192.168.1.3): 56 data bytes
64 bytes from 192.168.1.3: icmp_seq=0 ttl=60 time=2.263 ms
64 bytes from 192.168.1.3: icmp_seq=1 ttl=60 time=2.096 ms
^C

Also I do not see the "device timeout" messages when in BSS mode!
(been running ping -f to the ap's ip address for five minutes now)

-- 
Pawel
Received on Sun Dec 12 2004 - 02:21:53 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:24 UTC