From: Marcelo B. (mailpass) <mo...@mo...> - 2006-01-26 12:19:28
|
Do you want logs with or without the L_DATA change? I just rebooted with your patch, without the L_DATA change and saw not bogus ESSIDs, probably the wrong offsets were causing it, or the sun explosions were too strong the other day. :) On Wed, 2006-01-25 at 10:49 +0200, Denis Vlasenko wrote: > On Wednesday 25 January 2006 01:16, Marcelo Bezerra wrote: > > On Tue, 2006-01-24 at 15:49 +0200, Denis Vlasenko wrote: > > > > > Please remove the if below (=========>) and let us see > > > the whole packets. I suspect there is junk at the end of beacons. > > > > > > void > > > acx_log_bad_eid(wlan_hdr_t* hdr, int len, wlan_ie_t* ie_ptr) > > > { > > > if (acx_debug & L_ASSOC) { > > > int offset = (u8*)ie_ptr - (u8*)hdr; > > > printk("acx: unknown EID %d in mgmt frame at offset %d. IE: ", > > > ie_ptr->eid, offset); > > > /* IE len can be bogus, IE can extend past packet end. Oh well... */ > > > acx_dump_bytes(ie_ptr, ie_ptr->len + 2); > > > =======> if (acx_debug & L_DATA) { > > > printk("frame (%s): ", > > > acx_get_packet_type_string(le16_to_cpu(hdr->fc))); > > > acx_dump_bytes(hdr, len); > > > } > > > } > > > } > > > > > > -- > > > vda > > Ok. > > Here are some logged EIDs I got from a quick run with the suggested > > change. > > Oh no. This is the error in packet length calculation. acx thinks > that packet is 8 bytes longer than it really is. Fixing. See attached. > > wlan0: received packet has bogus ESSID > acx: unknown EID 56 in mgmt frame at offset 81. IE: 38 03 31 39 32 > frame (MGMT/Beacon): 80 00 00 00 > FF FF FF FF FF FF > 00 07 40 76 D0 CB > 00 07 40 76 D0 CB > 60 0F > 85 61 B9 4B 1C 01 00 00 > 64 00 > 11 00 > 00 05 6D 6F 73 63 61 - ESSID is "mosca" > 01 04 82 84 0B 16 > 03 01 01 > 05 04 00 01 00 00 > 2A 01 04 > 2F 01 04 > 32 08 0C 12 18 24 30 48 60 6C > DD 05 00 10 18 01 00 > 38 03 31 39 32 07 69 6E - wrongly interpreted as part of the packet > > OTOH "wlan0: received packet has bogus ESSID" puzzles me. > There IS the ESSID! Please add these printks and show us the log: > > wlan_mgmt_decode_beacon(wlan_fr_beacon_t * f) > { > ... > /*-- Information elements */ > ie_ptr = OFFSET(f->hdr, WLAN_BEACON_OFF_SSID); > +printk("Parsing beacon\n"); > while (ie_ptr < end) { > switch (IE_EID(ie_ptr)) { > case WLAN_EID_SSID: > +printk("ESSID found\n"); > f->ssid = (wlan_ie_ssid_t *) ie_ptr; > break; > > -- > vda |