[Fwd: RE: [Madwifi-users] Corrupt frames on wlan0 when ath0 and wlan0 are in the same bridge.]

Bob Ketterhagen bobk
Mon Jul 26 08:27:29 PDT 2004


I am forwarding the fix for the madwifi driver so it will coexist
properly with hostap in a bridge.

That way both lists have info to fix it.

bob

-----Forwarded Message-----
> From: Jeff David <jdavid at amperion.com>
> To: bobk at southernlinux.net, madwifi-users at lists.sourceforge.net
> Cc: hostap at shmoo.com, dragorn at kismetwireless.net
> Subject: RE: [Madwifi-users] Corrupt frames on wlan0 when ath0 and wlan0 are in the same bridge.
> Date: Mon, 26 Jul 2004 07:52:21 -0400
> 
> This looks like the mangled mac address problem, which occurs only when
> the wlan is on the bridge.  It can be fixed with Fedor Bezrukov's patch,
> which is attached.
> 
> Regards,
> Jeff
> 
> 
> > -----Original Message-----
> > From: Bob Ketterhagen [mailto:bobk at southernlinux.net] 
> > Sent: Sunday, July 25, 2004 3:45 PM
> > To: madwifi-users at lists.sourceforge.net
> > Cc: hostap at shmoo.com; dragorn at kismetwireless.net
> > Subject: [Madwifi-users] Corrupt frames on wlan0 when ath0 
> > and wlan0 are in the same bridge.
> > 
> > 
> > I am not sure which driver is causing hostap to flake out.
> > When adding ath0 and wlan0 into br0 together wlan0 no longer 
> > is able to pass data. The frames are corrupt.
> > 
> > Here is a tcpdump of me requesting an ip from wlan0 with it 
> > in a bridge with ath0
> > 
> > 15:31:04.424830 aa:aa:03:00:00:00 > 6f:20:8f:45:70:00, 
> > ethertype IPv4 (0x0800), length 590: IP 0.0.0.0.bootpc > 
> > 255.255.255.255.bootps: BOOTP/DHCP, Request [|bootp] 
> > 15:31:04.425364 aa:aa:03:00:00:00 > 6f:20:8f:45:70:00, 
> > ethertype IPv4 (0x0800), length 590: IP 0.0.0.0.bootpc > 
> > 255.255.255.255.bootps: BOOTP/DHCP, Request [|bootp] 
> > 15:31:21.606024 aa:aa:03:00:00:00 > 6f:20:8f:45:80:00, 
> > ethertype IPv4 (0x0800), length 590: IP 0.0.0.0.bootpc > 
> > 255.255.255.255.bootps: BOOTP/DHCP, Request [|bootp] 
> > 15:31:21.606553 aa:aa:03:00:00:00 > 6f:20:8f:45:80:00, 
> > ethertype IPv4 (0x0800), length 590: IP 0.0.0.0.bootpc > 
> > 255.255.255.255.bootps: BOOTP/DHCP, Request [|bootp]
> > 
> > The mac address is corrupt.
> > 
> > Here is a tcpdump of me requesting an ip from ath0 with it in 
> > a bridge with wlan0
> > 
> > 15:33:09.507532 00:02:6f:20:8f:45 > Broadcast, ethertype IPv4 
> > (0x0800), length 590: IP 0.0.0.0.bootpc > 
> > 255.255.255.255.bootps: BOOTP/DHCP, Request [|bootp] 
> > 15:33:09.510403 00:02:6f:20:f5:10 > 00:02:6f:20:8f:45, 
> > ethertype IPv4 (0x0800), length 344: IP 10.5.5.1.bootps > 
> > 255.255.255.255.bootpc: BOOTP/DHCP, Reply, length: 302 
> > 15:33:09.514871 00:02:6f:20:8f:45 > Broadcast, ethertype IPv4 
> > (0x0800), length 590: IP 0.0.0.0.bootpc > 
> > 255.255.255.255.bootps: BOOTP/DHCP, Request [|bootp] 
> > 15:33:09.517858 00:02:6f:20:f5:10 > 00:02:6f:20:8f:45, 
> > ethertype IPv4 (0x0800), length 344: IP 10.5.5.1.bootps > 
> > 255.255.255.255.bootpc: BOOTP/DHCP, Reply, length: 302 
> > 15:33:09.521777 00:02:6f:20:8f:45 > Broadcast, ethertype ARP 
> > (0x0806), length 60: arp reply 10.5.5.2 is-at 00:02:6f:20:8f:45
> > 
> > ath0 works fine in a bridge with wlan0
> > but wlan0 corrupts the frames when it is in a bridge with ath0.
> > 
> > I am using the hostap snapshot and the cvs version of madwifi.
> > 
> > Why does a hostap driven interface in a bridge with a madwifi 
> > driven interface no longer work?
> > 
> > props to dragorn for helping me.
> > 
> > bob
> > 
> > 
> 
> ______________________________________________________________________
> From: Fedor Bezrukov <fedor at ms2.inr.ac.ru>
> To: madwifi-devel at lists.sourceforge.net
> Subject: [Madwifi-devel] Use of ath_pci in bridges
> Date: Thu, 03 Jun 2004 10:35:26 -0400
> 
> Hello!
> 
> There is a problem when you try to use an Atheros card in a computer
> configured as a bridge (and it is a natural configuration if you try to use
> it instead of a normal access point).
> 
> The bug is that the madwifi driver changes the packet headers during its
> operation. This is ok for normal use, but generally, it is supposed in the
> kernel that they should not be changed. For example, passing of ARP packets
> on the linux box, configured as a bridge, breaks (the box misses ARP
> packets directed to itself) with currect madwifi driver.
> 
> This can be cured if the madwifi driver copies skb head if the skb is cloned
> (that is somebody else may see the header).
> 
> I've left the patch on the sourceforge page (patch [859544] ). Maybe you can
> think of incorporating this into the main branch?
> 
> Fedor Bezrukov
> 
> PS. Unfortunately, the first version of the patch that was there had a very
> bad bug, that caused total memory corruption.  Now it is cured.
> 
> --- madwifi/driver/if_ath.c.flb 2004-06-03 18:09:26.632599640 +0400
> +++ madwifi/driver/if_ath.c     2004-06-03 18:09:35.526247600 +0400
> @@ -761,7 +761,8 @@
>         if (ic->ic_flags & IEEE80211_F_WEPON)
>                 len += IEEE80211_WEP_IVLEN + IEEE80211_WEP_KIDLEN;
>  
> -       if ((skb_headroom(skb) < len) &&
> +       if (len < skb_headroom(skb)) len=skb_headroom(skb);
> +       if ((skb_cloned(skb) || (skb_headroom(skb) < len)) &&
>             pskb_expand_head(skb, len - skb_headroom(skb), 0, GFP_ATOMIC)) {
>                 dev_kfree_skb(skb);
>                 return -ENOMEM;
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by the new InstallShield X.
> >From Windows to Linux, servers to mobile, InstallShield X is the one
> installation-authoring solution that does it all. Learn more and
> evaluate today! http://www.installshield.com/Dev2Dev/0504
> _______________________________________________
> Madwifi-devel mailing list
> Madwifi-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/madwifi-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.shmoo.com/pipermail/hostap/attachments/20040726/eebf215b/attachment.pgp 



More information about the Hostap mailing list