hostapd and madwifi don't work well

Pelusa Vali pelusitavali
Sun Mar 19 16:55:01 PST 2006


hi list, well i'd like report problems i'm having with madwifi and hostapd.
first of all i had to upgrade to etch from sarge to get last libraries needed to compile hostapd, in other way it was impossible, trying to install them alone get my system totally unstable.
well after upgrading and installed whole libraries needed, i compiled madwifi-ng-r1475, everything was ok, my clients could connect and work very well by hours, no problem.
so wanted to add security, decided to use hostapd, i really want tls but for testing purposes decided start only with psk, so compiled hostapd-0.5.1, i could do this: 

make clean
make
make install

but any file was copied to system, so copied hostapd.conf from madwifi docs and try to work, i could start program and clients try to connect, even get connection by 2 seconds at intervals, but never get total connection, always stay in "Aquiring network address" and i get this from hostapd:

ath0: STA 00:0f:66:11:c1:96 WPA: EAPOL-Key timeout
WPA: 00:0f:66:11:c1:96 WPA_PTK entering state PTKINITNEGOTIATING
madwifi_get_seqnum: addr=00:00:00:00:00:00 idx=1
ath0: STA 00:0f:66:11:c1:96 WPA: sending 3/4 msg of 4-Way Handshake
Plaintext EAPOL-Key Key Data - hexdump(len=40): [REMOVED]
TX EAPOL - hexdump(len=153): 00 0f 66 11 c1 96 00 0f 66 11 c1 97 88 8e 02 03 00 87 fe 01 ca 00 10 00 00 00 00 00 00 00 05 b2 28 81 f6 12 c2 cf 57 b1 cf 17 06 7d  da 74 42 d7 be 81 63 48 51 73 cf c5 59 67 31 3f 6d 22 87 00 00 00 00 00 00 00 0 0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 97 2d b4 0f 31 bb 01 07 9a 04 dc b2 6f 6c a7 2e 00 28 73 04 45 27 49 f6 96 ab 0e 19 c7  0f 76 8c 81 c4 f3 44 f0 72 f3 aa e4 22 fe 7d 31 70 fa ff fa c0 96 4c 97 8f a2 3 c c5 4e
WPA: 00:0f:66:11:c1:96 WPA_PTK entering state DISCONNECT
hostapd_wpa_auth_disconnect: WPA authenticator requests disconnect: STA 00:0f:66 :11:c1:96 reason 2
madwifi_sta_deauth: addr=00:0f:66:11:c1:96 reason_code=2
WPA: 00:0f:66:11:c1:96 WPA_PTK entering state DISCONNECTED
WPA: 00:0f:66:11:c1:96 WPA_PTK entering state INITIALIZE
madwifi_del_key: addr=00:0f:66:11:c1:96 key_idx=0
ioctl[unknown???]: Invalid argument
ath0: STA 00:0f:66:11:c1:96 IEEE 802.1X: unauthorizing port
madwifi_set_sta_authorized: addr=00:0f:66:11:c1:96 authorized=0
ioctl[unknown???]: Invalid argument
ath0: STA 00:0f:66:11:c1:96 IEEE 802.11: deauthenticated due to local deauth req uest
Wireless event: cmd=0x8c04 len=20
ath0: STA 00:0f:66:11:c1:96 IEEE 802.11: deassociated
Wireless event: cmd=0x8c03 len=20
ath0: STA 00:0f:66:11:c1:96 IEEE 802.11: associated
  New STA
ath0: STA 00:0f:66:11:c1:96 WPA: event 1 notification
madwifi_del_key: addr=00:0f:66:11:c1:96 key_idx=0
ath0: STA 00:0f:66:11:c1:96 WPA: start authentication
WPA: 00:0f:66:11:c1:96 WPA_PTK entering state INITIALIZE
madwifi_del_key: addr=00:0f:66:11:c1:96 key_idx=0
ath0: STA 00:0f:66:11:c1:96 IEEE 802.1X: unauthorizing port
madwifi_set_sta_authorized: addr=00:0f:66:11:c1:96 authorized=0
WPA: 00:0f:66:11:c1:96 WPA_PTK_GROUP entering state IDLE
WPA: 00:0f:66:11:c1:96 WPA_PTK entering state AUTHENTICATION
WPA: 00:0f:66:11:c1:96 WPA_PTK entering state AUTHENTICATION2
WPA: 00:0f:66:11:c1:96 WPA_PTK entering state INITPSK
WPA: 00:0f:66:11:c1:96 WPA_PTK entering state PTKSTART
ath0: STA 00:0f:66:11:c1:96 WPA: sending 1/4 msg of 4-Way Handshake
TX EAPOL - hexdump(len=121): 00 0f 66 11 c1 96 00 0f 66 11 c1 97 88 8e 02 03 00 67 fe 00 8a 00 10 00 00 00 00 00 00 00 01 b2 28 81 f6 12 c2 cf 57 b1 cf 17 06 7d  da 74 42 d7 be 81 63 48 51 73 cf c5 59 67 31 3f 6d 22 88 00 00 00 00 00 00 00 0 0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
IEEE 802.1X: 5 bytes from 00:0f:66:11:c1:96
   IEEE 802.1X: version=1 type=1 length=0
   ignoring 1 extra octets after IEEE 802.1X packet
IEEE 802.1X: 125 bytes from 00:0f:66:11:c1:96
   IEEE 802.1X: version=1 type=3 length=121
ath0: STA 00:0f:66:11:c1:96 WPA: received EAPOL-Key frame (2/4 Pairwise)
WPA: 00:0f:66:11:c1:96 WPA_PTK entering state PTKCALCNEGOTIATING
PMK - hexdump(len=32): [REMOVED]
PTK - hexdump(len=64): [REMOVED]
WPA: 00:0f:66:11:c1:96 WPA_PTK entering state PTKCALCNEGOTIATING2
WPA: 00:0f:66:11:c1:96 WPA_PTK entering state PTKINITNEGOTIATING
madwifi_get_seqnum: addr=00:00:00:00:00:00 idx=1
ath0: STA 00:0f:66:11:c1:96 WPA: sending 3/4 msg of 4-Way Handshake

Ethereal always shows MDS HEADER MALFORMED PACKET.
 
so decided try with hostapd-0.4.8, and now get this:

ath0: STA 00:0f:66:11:c1:96 WPA: received EAPOL-Key frame (4/4 Pairwise)
WPA: 00:0f:66:11:c1:96 WPA_PTK entering state PTKINITDONE
madwifi_set_key: alg=TKIP addr=00:0f:66:11:c1:96 key_idx=0
ath0: STA 00:0f:66:11:c1:96 IEEE 802.1X: authorizing port
madwifi_set_sta_authorized: addr=00:0f:66:11:c1:96 authorized=1
madwifi_sta_clear_stats: addr=00:0f:66:11:c1:96
ath0: STA 00:0f:66:11:c1:96 WPA: pairwise key handshake completed (WPA)
madwifi_sta_clear_stats: addr=00:0f:66:11:c1:96
WPA: 00:0f:66:11:c1:96 WPA_PTK_GROUP entering state REKEYNEGOTIATING
madwifi_get_seqnum: addr=00:00:00:00:00:00 idx=1
ath0: STA 00:0f:66:11:c1:96 WPA: sending 1/2 msg of Group Key Handshake
Plaintext EAPOL-Key Key Data - hexdump(len=32): 6c d7 50 cf 76 e1 ed 65 ce 95 4a  3a c4 bf fd 10 45 a0 c2 11 0b e0 59 ff c7 c9 41 12 9f 72 3c 19
ath0: STA 00:0f:66:11:c1:96 WPA: EAPOL-Key timeout
WPA: 00:0f:66:11:c1:96 WPA_PTK_GROUP entering state REKEYNEGOTIATING
madwifi_get_seqnum: addr=00:00:00:00:00:00 idx=1
ath0: STA 00:0f:66:11:c1:96 WPA: sending 1/2 msg of Group Key Handshake
Plaintext EAPOL-Key Key Data - hexdump(len=32): 6c d7 50 cf 76 e1 ed 65 ce 95 4a  3a c4 bf fd 10 45 a0 c2 11 0b e0 59 ff c7 c9 41 12 9f 72 3c 19
IEEE 802.1X: 99 bytes from 00:0f:66:11:c1:96
   IEEE 802.1X: version=1 type=3 length=95
ath0: STA 00:0f:66:11:c1:96 WPA: received EAPOL-Key frame (2/2 Group)
WPA: 00:0f:66:11:c1:96 WPA_PTK_GROUP entering state REKEYESTABLISHED
ath0: STA 00:0f:66:11:c1:96 WPA: group key handshake completed (WPA)
WPA: 00:0f:66:11:c1:96 WPA_PTK_GROUP entering state IDLE
Wireless event: cmd=0x8c03 len=20
ath0: STA 00:0f:66:11:c1:96 IEEE 802.11: associated
ath0: STA 00:0f:66:11:c1:96 WPA: event 1 notification
madwifi_del_key: addr=00:0f:66:11:c1:96 key_idx=0
ath0: STA 00:0f:66:11:c1:96 WPA: event 4 notification
madwifi_del_key: addr=00:0f:66:11:c1:96 key_idx=0
WPA: 00:0f:66:11:c1:96 WPA_PTK entering state AUTHENTICATION2
WPA: 00:0f:66:11:c1:96 WPA_PTK entering state INITPSK
WPA: 00:0f:66:11:c1:96 WPA_PTK entering state PTKSTART
ath0: STA 00:0f:66:11:c1:96 WPA: sending 1/4 msg of 4-Way Handshake
IEEE 802.1X: 5 bytes from 00:0f:66:11:c1:96
   IEEE 802.1X: version=1 type=1 length=0
   ignoring 1 extra octets after IEEE 802.1X packet
IEEE 802.1X: 125 bytes from 00:0f:66:11:c1:96
   IEEE 802.1X: version=1 type=3 length=121
ath0: STA 00:0f:66:11:c1:96 WPA: received EAPOL-Key frame (2/4 Pairwise)
WPA: 00:0f:66:11:c1:96 WPA_PTK entering state PTKCALCNEGOTIATING
PMK - hexdump(len=32): be 6c 65 0a f0 3b ab 57 0a 8e 33 d4 35 ef a3 e6 1b 72 d5 6c 86 0d 34 61 da 4a db 68 50 e2 4c 35
PTK - hexdump(len=64): fe 57 c4 28 a6 f0 8a 15 9c 52 97 96 ab cc ce 77 fe 8d e7 3e 45 90 65 4c aa 61 09 2c a2 5e 12 95 c8 69 a6 c2 21 9a bd 4d 00 58 d6 46 63 d6  90 68 ed d8 9d 34 54 77 2b 98 95 89 99 cf 94 cb 56 cf
WPA: 00:0f:66:11:c1:96 WPA_PTK entering state PTKCALCNEGOTIATING2
WPA: 00:0f:66:11:c1:96 WPA_PTK entering state PTKINITNEGOTIATING
madwifi_get_seqnum: addr=00:00:00:00:00:00 idx=1
ath0: STA 00:0f:66:11:c1:96 WPA: sending 3/4 msg of 4-Way Handshake
IEEE 802.1X: 99 bytes from 00:0f:66:11:c1:96
   IEEE 802.1X: version=1 type=3 length=95
ath0: STA 00:0f:66:11:c1:96 WPA: received EAPOL-Key frame (4/4 Pairwise)
WPA: 00:0f:66:11:c1:96 WPA_PTK entering state PTKINITDONE
madwifi_set_key: alg=TKIP addr=00:0f:66:11:c1:96 key_idx=0
ath0: STA 00:0f:66:11:c1:96 IEEE 802.1X: authorizing port
madwifi_set_sta_authorized: addr=00:0f:66:11:c1:96 authorized=1
madwifi_sta_clear_stats: addr=00:0f:66:11:c1:96
ath0: STA 00:0f:66:11:c1:96 WPA: pairwise key handshake completed (WPA)
madwifi_sta_clear_stats: addr=00:0f:66:11:c1:96
WPA: 00:0f:66:11:c1:96 WPA_PTK_GROUP entering state REKEYNEGOTIATING
madwifi_get_seqnum: addr=00:00:00:00:00:00 idx=1
ath0: STA 00:0f:66:11:c1:96 WPA: sending 1/2 msg of Group Key Handshake
Plaintext EAPOL-Key Key Data - hexdump(len=32): 6c d7 50 cf 76 e1 ed 65 ce 95 4a  3a c4 bf fd 10 45 a0 c2 11 0b e0 59 ff c7 c9 41 12 9f 72 3c 19
IEEE 802.1X: 99 bytes from 00:0f:66:11:c1:96
   IEEE 802.1X: version=1 type=3 length=95
ath0: STA 00:0f:66:11:c1:96 WPA: received EAPOL-Key frame (2/2 Group)
WPA: 00:0f:66:11:c1:96 WPA_PTK_GROUP entering state REKEYESTABLISHED
ath0: STA 00:0f:66:11:c1:96 WPA: group key handshake completed (WPA)
WPA: 00:0f:66:11:c1:96 WPA_PTK_GROUP entering state IDLE
Wireless event: cmd=0x8c04 len=20
ath0: STA 00:0f:66:11:c1:96 IEEE 802.11: deassociated
ath0: STA 00:0f:66:11:c1:96 WPA: event 2 notification
madwifi_del_key: addr=00:0f:66:11:c1:96 key_idx=0
ioctl[unknown???]: Invalid argument

clients of course cann't connect and always stay in "Aquiring network address"

finally decided to try with hostapd-0.5.1.deb, now get this:

www:/home/server# /etc/init.d/hostapd start
Starting advanced IEEE 802.11 management: hostapdioctl[unknown???]: Argument list too long
...failed.

www:/home/server# hostapd -dd /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
madwifi_set_iface_flags: dev_up=0
Using interface ath0 with hwaddr 00:0f:66:11:c1:97 and ssid 'MYWLAN'
madwifi_set_ieee8021x: enabled=1
madwifi_configure_wpa: group key cipher=1
madwifi_configure_wpa: pairwise key ciphers=0x2
madwifi_configure_wpa: key management algorithms=0x2
madwifi_configure_wpa: rsn capabilities=0x0
madwifi_configure_wpa: enable WPA= 0x1
madwifi_set_iface_flags: dev_up=1
madwifi_set_key: alg=TKIP addr=00:00:00:00:00:00 key_idx=1
madwifi_set_privacy: enabled=1
Flushing old station entries
madwifi_sta_deauth: addr=ff:ff:ff:ff:ff:ff reason_code=3
ioctl[unknown???]: Argument list too long
Could not connect to kernel driver.
Deauthenticate all stations
madwifi_set_privacy: enabled=0
madwifi_set_ieee8021x: enabled=0
madwifi_set_iface_flags: dev_up=0

nothing happens, nothing works.

so decided back to initial configuration, without hostapd, but now clients disconnect each 10 minutes, so something is wrong with my system, but what?? with first implementation clients showed successfull wlan connection icon (winxp), now, they are connected but icon shows they are not, and ethereal shows MDS MALFORMED PACKET.

so two questions:

1) what should i do to get my system again working well, as first implementation?? i deleted everything related with hostapd.  should i reinstall whole system? Please tell me it's not necessary!!
2) why hostapd and madwifi aren't talking each other??

this is my hostapd.conf file:

interface=ath0
driver=madwifi
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=1
debug=0
dump_file=/tmp/hostapd.dump
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
ssid=MYWLAN
macaddr_acl=0
auth_algs=1
wpa_passphrase=mywlan
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP 

ok, i know it's a huge e-mail, excuse me, i hope some charitable soul could help me.

thanks in advance for your patience.




_______________________________________________________________ 
The island of Gotland belongs to which country? 

postmaster.co.uk
http://www.postmaster.co.uk/cgi-bin/meme/quiz.pl?id=183





More information about the Hostap mailing list