Please note: This project is no longer active. The website is kept online for historic purposes only.
If you´re looking for a Linux driver for your Atheros WLAN device, you should continue here .

Ticket #407 (reopened defect)

Opened 16 years ago

Last modified 13 years ago

bridged mode wont work

Reported by: anonymous Assigned to:
Priority: major Milestone:
Component: madwifi: other Version:
Keywords: Cc:
Patch is attached: 0 Pending:

Description (Last modified by mrenzmann)

I have the latest svn release for madwifi-ng and a Dlink DWL-530AG. The ath0 it autocreated works fine and was able to connect to my AP.

However, I want to use this ath0 interface in bridged mode, but it doesn't seem to work.

This is what i see in the logs:

bridge-ath0: enabling the bridge
bridge-ath0: can't bridge with ath0, bad header length 88
bridge-ath0: interface ath0 is not a valid Ethernet interface
bridge-ath0: can't bridge with ath0, bad header length 88

I'm trying the bridge with VMware Workstation. I ran the vmware-config.pl and tried to use ath0 in bridged mode.

thanks.

Attachments

madwifi-ng-r1866-no-headerlen-resv.patch (425 bytes) - added by rich@phekda.gotadsl.co.uk on 12/26/06 23:12:39.
Patch to disable hardware header reservation

Change History

02/19/06 09:33:37 changed by mrenzmann

  • version set to trunk.
  • description changed.

What do you mean with "I'm trying the bridge with VMware Workstation"? You try to use it inside a VMWare bridge, and the message you see actually comes from VMware?

02/19/06 23:33:09 changed by anonymous

Hi,

actually no. All VMware does is try to bridge two interfaces i think. 
for example, it has vmnet interface for the vm's and i think it tries 
to bridge that interface with ath0.

However, some kernel errors end up in /var/log/messages as you can 
see above. I dont think these logs come from vmware.

02/20/06 06:25:03 changed by mrenzmann

Afaik VMWare has its own bridge implementation, in contrast to the in-kernel support of layer 2 bridges. Do you use the in-kernel bridge support, or do you use the bridging facility that is provided by VMWare?

02/21/06 07:45:37 changed by anonymous

I'm actually not sure. But, i'll be happy to check on what bridge is being used, if its in-kernel or something by vmware if you can tell me how to check. I thought it was the kernels because those logs appear in the /var/log/messages which is usually kernel related for me.

thanks for looking into this.

02/24/06 06:32:30 changed by mrenzmann

Providing a list of modules loaded on the host while VMWare is running might give a hint.

02/28/06 05:54:43 changed by anonymous

I ran into this same problem after installing the latest madwifi from ATrpms: madwifi-kmdl-2.6.15-1.1831_FC4smp-0.9.6.0-20.rhfc4.at.

I fell back to the previous kernel and previous madwifi driver (madwifi-kmdl-2.6.15-1.1830_FC4smp-0.9.6.0-18.rhfc4.at) and all is well.

Going to try rolling back to the 0.9.6.0-18 driver with the 2.6.15-1.1831_FC4smp kernel now.

02/28/06 22:40:17 changed by bnz

i have this problem as well with the (free) vmware server and madwifi trunk. does anyone know an svn revision that works with vmware?

03/06/06 03:48:13 changed by Axel Thimm

  • cc set to Axel.Thimm@ATrpms.net.
  • version deleted.

Wrt the comment on the ATrpms' versions used:

madwifi-0.9.6.0-18 is from CVS 20051002 and madwifi-0.9.6.0-20 is from svn 20050127 (r1417)

both from the old branch. The bulk of changes seem to be in net80211:

# find madwifi-0.9.6.0-20051002 madwifi-0.9.6.0 -type f | xargs perl -pi -e's,\$Id: [^\$]*\$,\$Id:\$,'
[root@junior madwifi]# diff -rud madwifi-0.9.6.0-20051002 madwifi-0.9.6.0 | diffstat
 Makefile                      |    5 ++--
 Makefile.inc                  |   35 ++++++++++++++++++++++++---------
 ath/if_ath.c                  |   44 +++++++++++++++++++++++++++++++++++-------
 ath/if_ath_pci.c              |    2 -
 ath/if_ath_pci.h              |    4 +++
 ath/if_athvar.h               |    1 
 net80211/ieee80211_input.c    |   14 ++++++-------
 net80211/ieee80211_ioctl.h    |    2 +
 net80211/ieee80211_linux.c    |    6 +++--
 net80211/ieee80211_linux.h    |    6 +----
 net80211/ieee80211_node.c     |   34 ++++++++++++++++++--------------
 net80211/ieee80211_node.h     |    9 ++------
 net80211/ieee80211_output.c   |   21 ++++++++++++--------
 net80211/ieee80211_proto.c    |    8 +++----
 net80211/ieee80211_proto.h    |    3 --
 net80211/ieee80211_var.h      |   12 ++++-------
 net80211/ieee80211_wireless.c |    5 ++--
 tools/Makefile                |    4 +--
 tools/athctrl.c               |    4 ++-
 19 files changed, 140 insertions(+), 79 deletions(-)

Should I repackage the October version?

03/12/06 20:07:18 changed by anonymous

I, for one, would love to see madwifi-0.9.6.0-18/CVS 20051002 packaged for 2.6.15-1.1833-FC4[smp].

03/20/06 04:19:27 changed by jemiele1@hotmail.com

I am also seeing the same error message using VMWare 5.5.1 with snapshot "madwifi-ng-r1475-20060317.tar.gz".

C programming is not my forte, but I did poke through the source of bridge.c from VMWare. The check in question is against kernel variable ETH_HLEN, which appears to be 14, but ath0 is returning 88.

Since VMWare has made their player freely available for downloading, perhaps the devs can take a look at the source and check it out further.

I'm not sure what other information I can provide, but I'm willing to help as much as I can to get this problem resolved. Output from dmesg, patch testing, etc. Just say the word.

Thanks.

05/14/06 16:15:32 changed by xgerligand@free.fr

Hi.

I had the same problem. I just comment following lines (near 680) in ath/if_ath.c program: #ifdef USE_HEADERLEN_RESV

dev->hard_header_len += sizeof(struct ieee80211_qosframe) +

sizeof(struct llc) + IEEE80211_ADDR_LEN + IEEE80211_WEP_IVLEN + IEEE80211_WEP_KIDLEN;

#ifdef ATH_SUPERG_FF

dev->hard_header_len += ATH_FF_MAX_HDR;

#endif #endif

After that, i started vmware-config.pl ; vmware, and worked without any problem...

Bye. Xavier

05/14/06 16:50:16 changed by xgerligand@free.fr

Sorry for bad format!

Here the new text:

I had the same problem. I just comment the following lines (near 680) in ath/if_ath.c program:

#ifdef USE_HEADERLEN_RESV
        dev->hard_header_len += sizeof(struct ieee80211_qosframe) +
                                sizeof(struct llc) +
                                IEEE80211_ADDR_LEN +
                                IEEE80211_WEP_IVLEN +
                                IEEE80211_WEP_KIDLEN;
#ifdef ATH_SUPERG_FF
        dev->hard_header_len += ATH_FF_MAX_HDR;
#endif
#endif

After that, i started vmware-config.pl ; vmware, and worked without any problem... Bye. Xavier

08/08/06 01:18:15 changed by mentor

The Linux kernel bridging seems to handle the frames passed to it by MadWiFi. If this is because of generic handling of packets in the bridging code, rather thana a hack, I would suggest that VMWare implement this also. Otherwise, we will implement something compatible.

I will have have a look at the bridging code at some point; but it isn't high on my list of priorities.

08/16/06 12:20:10 changed by Nigel Cunningham <nigel@suspend2.net>

This is fixed by VMware workstation 5.5.2; I had the same issue and am now able to get a dhcp lease for the virtual machine on the wireless network, have the VM be a full participant in the Samba networking and so on.

08/16/06 14:56:01 changed by mrenzmann

  • status changed from new to closed.
  • resolution set to wontfix.

Thanks for the feedback, that sounds good. I'll close the ticket as "wontfix" - since VMWare now includes a fix, we don't need to do something in this regard.

However, if it turns out to be still an issue, feel free to reopen the ticket.

08/21/06 09:15:58 changed by cameron.taggart@gmail.com

  • status changed from closed to reopened.
  • resolution deleted.

Great to hear that is works in Workstation 5.5.2, but it does not seem to be fixed in VMware-player-1.0.2-29634.tar.gz.

Reopening ticket since there are probably a lot more Players than Workstations.

09/05/06 01:02:07 changed by anonymous

I just released that I still had the above patch applied, and I need both the upgrade and the patch for bridging to work. Perhaps the same applies to vmware player.

09/05/06 01:03:14 changed by Nigel Cunningham

Ah. Sorry for doing the previous anonymously.

10/08/06 05:38:16 changed by greggatghc@gmail.com

is this fixed yet?

10/09/06 00:51:33 changed by stgraber@stgraber.org

No, I have the same issue with vmware 5.5.2 and the latest madwifi from svn.

10/09/06 08:19:21 changed by Nigel Cunningham

Did you try applying the above patch as well?

10/09/06 09:49:27 changed by anonymous

When commenting these lines it works yes.

10/09/06 09:50:22 changed by stgraber@stgraber.org

Anonymous = me :)

10/11/06 20:33:34 changed by anonymous

problem seems to be still pretty common - checked vmware groups, there are a few people asking about this, but there is no fix. i have the same problem on gentoo 2006.1/madwifi-ng0.9.2/vmware5.5.1

10/12/06 00:45:07 changed by Nigel Cunningham

Update to 5.5.2 and apply the commenting above (from xgerligand@free.fr's email) if it's still needed (I'm not running 0.9.2).

Regards,

Nigel

11/03/06 23:19:47 changed by anonymous

I've got a vmnet wireless bridge working with vmware 5.5.2 and madwifi 0.9.2 with the above lines commented out in ath/if_ath.c .

DO NOT INSTALL any-to-any PATCHES. I was struggling for a while and this turned out to be my problem.

12/10/06 06:17:56 changed by sellout@gmail.com

I am using 0.9.2 and those lines are already commented? and I have the EXACT same problems described above... :-/

12/10/06 06:18:54 changed by sellout4him@gmail.com

typo in my email addie :-)

12/22/06 23:46:58 changed by rich@phekda.gotadsl.co.uk

I'm also experiencing this problem with VMware-server-1.0.1-29996 (the latest at the time of writing).

12/23/06 02:40:36 changed by sellout4him@gmail.com

Has no one managed to find ANY way to get vmware working with madwifi? would a ghetto bridge to eth0 or some nonsence work? I am open to anything as I unfortunately need vmware for web code testing on proprietary browsers :-/

12/23/06 02:48:37 changed by Nigel Cunningham

Try the above, sellout4him@gmail - I'm using both Workstation and Player with Madwifi and it does work.

12/23/06 03:49:53 changed by sellout4him@gmail.com

my source has the ath/if_ath.c lines already commented out, latest gentoo ebuild. And compiled with that, i still have the same problem :-/

12/25/06 21:45:39 changed by sellout4him@gmail.com

Just got latest svn, and the above patch appears already applied...

...from my ath/if_ath.c :

663. #ifdef USE_HEADERLEN_RESV
664.	dev->hard_header_len += sizeof(struct ieee80211_qosframe) +
665.				sizeof(struct llc) +
666.				IEEE80211_ADDR_LEN +
667.				IEEE80211_WEP_IVLEN +
668.				IEEE80211_WEP_KIDLEN;
669. #ifdef ATH_SUPERG_FF
670.	dev->hard_header_len += ATH_FF_MAX_HDR;
671. #endif
672. #endif

...some of my modinfo:

BlindRomance madwifi # modinfo ath_pci
filename:       /lib/modules/2.6.17-beyond4/net/ath_pci.ko
author:         Errno Consulting, Sam Leffler
description:    Support for Atheros 802.11 wireless LAN cards.
version:        svn r1865
license:        Dual BSD/GPL
vermagic:       2.6.17-beyond4 SMP mod_unload 586 REGPARM gcc-4.1

...and finally the /var/log/messages excerpt from when I try to modprobe a freshly compiled vmnet:

[4376803.844000] bridge-ath0: interface ath0 is not a valid Ethernet interface
[4376803.844000] bridge-ath0: can't bridge with ath0, bad header length 88

Any help, suggestions or advice welcome!

12/25/06 22:59:47 changed by Nigel Cunningham

You need #if 0 ... #endif around that whole section:

#if 0
#ifdef USE_HEADERLEN_RESV
        dev->hard_header_len += sizeof(struct ieee80211_qosframe) +
                                sizeof(struct llc) +
                                IEEE80211_ADDR_LEN +
                                IEEE80211_WEP_IVLEN +
                                IEEE80211_WEP_KIDLEN;
#ifdef ATH_SUPERG_FF
        dev->hard_header_len += ATH_FF_MAX_HDR;
#endif
#endif
#endif

Nigel

12/26/06 23:12:39 changed by rich@phekda.gotadsl.co.uk

  • attachment madwifi-ng-r1866-no-headerlen-resv.patch added.

Patch to disable hardware header reservation

12/26/06 23:28:35 changed by rich@phekda.gotadsl.co.uk

The attached patch works for me with:

kernel-2.6.18-1.2868.fc6 VMware-server-1.0.1-29996

There's some code in net80211/ieee80211_input.c that's conditional on USE_HEADERLEN_RESV. The attached patch disables that code too. I'm not sure if this is necessary. The code conditional on USE_HEADERLEN_RESV in net80211/ieee80211_input.c seems to reimplement some of the Ethernet layer's default behaviour (compared with the 2.6.18.6 sources). I wonder if it can just be removed.

Does disabling USE_HEADERLEN_RESV have an impact on the SuperG mode? I can't test that, since I have no SuperG hardware.

12/27/06 19:46:15 changed by mrenzmann

  • cc deleted.

06/01/07 01:42:19 changed by alex

This is still a problem in Ubuntu 7.04 Feisty... :( Recompiling fixes it, but still pretty annoying.

I am curious why is this hard to fix.

06/04/07 14:39:18 changed by mentor

Probably because we don't want to fix it like that.

08/30/07 15:18:06 changed by oliver@leibrock.eu

VMware Server 1.0.3 build-44356

Ubuntu 6.06 LTS - the Dapper Drake -

2.6.15-28-686 SMP PREEMPT Wed Jul 18 22:57:30 UTC 2007 i686 GNU/Linux

root@Dragon:~# modinfo wlan
filename: /lib/modules/2.6.15-28-686/madwifi/wlan.ko
author: Errno Consulting, Sam Leffler
description: 802.11 wireless LAN protocol support
license: Dual BSD/GPL
vermagic: 2.6.15-28-686 SMP preempt 686 gcc-4.0
depends:
srcversion: 5B58AB535BC7F50DD5EC708
root@Dragon:~# modinfo new_wlan
filename: /lib/modules/2.6.15-28-686/madwifi-ng/new_wlan.ko
author: Errno Consulting, Sam Leffler
description: 802.11 wireless LAN protocol support
version: svn 2007-06-25
license: Dual BSD/GPL
vermagic: 2.6.15-28-686 SMP preempt 686 gcc-4.0
depends:
srcversion: E07E0EEF1FF0223391B1D49
root@Dragon:~#dmesg | tail -10
[17194194.220000] bridge-ath0: enabling the bridge
[17194194.220000] bridge-ath0: can't bridge with ath0, bad header length 88
[17194194.220000] bridge-ath0: interface ath0 is not a valid Ethernet interface
[17194194.220000] bridge-ath0: can't bridge with ath0, bad header length 88
root@Dragon:~#

worked on same Hardware for Ubuntu 7.04 with same/newer vmware versions ;-)

10/18/07 06:32:01 changed by anonymous

I'm having the same issue on Kubuntu 7.10 and VMWare Workstation 6.

11/24/07 01:22:04 changed by Furk

Me too. Same issue on Ubuntu 7.10 and VMWare server 6

No solution yet?

02/15/08 00:43:16 changed by anonymous

sorry, didn't realise it was wikiformatting: I am having this exact problem, but all I get is:

Starting VMware services:
   Virtual machine monitor                                             done
   Virtual ethernet                                                    done
   Bridged networking on /dev/vmnet0                                  failed
   Host-only networking on /dev/vmnet1 (background)                    done
   Host-only networking on /dev/vmnet8 (background)                    done
   NAT service on /dev/vmnet8                                          done

ath0 is supposed to be bridged to vmnet0

04/15/08 01:59:28 changed by subscribed-lists@sterndata.com

I have the same problem with "Bridged networking on /dev/vmnet0" using VMWareServer and revision 3544.

08/04/08 22:01:34 changed by anonymous

I also see this using Ubuntu 8.04 64 and VMware Workstation 6.0.4 build 93057. I tried using the patch, now loads fine, it still doesn't work :-( Tried compiling with both gcc3.4 and 4.2.3 (Ubuntu's default for 8.04).

VMs in NAT mode work fine, but that's not what I need...

08/10/08 23:30:24 changed by anonymous

Same problem confirmed for Ubuntu 8.04.1 with VMware Player 2.0.4 build-93057. The patch fixes it, but I've noticed connection drops. Not sure if the patch causes them.

08/10/08 23:39:16 changed by anonymous

I'm using SVN r3745, though, since I need the Aircrack-ng patch to work. Testing for latest stable now.

08/13/08 23:47:00 changed by anonymous

The last two posts are mine. I've tested both the bridge patch and the Aircrack-ng patch against r3844, and I didn't encounter any connection drops. Everything seems fine. :)

09/26/08 14:19:47 changed by oliver@leibrock.eu

VMware Server 1.0.6 build-91891 & VMware Server 1.0.7 build-108231

Ubuntu 8.04: 2.6.24-19-generic SMP Wed Aug 20 22:56:21 UTC 2008 i686 GNU/Linux

still having the Issue: Starting VMware services:

  Bridged networking on /dev/vmnet0                                  failed

dmesg output is still:

 [ 3149.928214] bridge-ath0: enabling the bridge
 [ 3149.928218] bridge-ath0: can't bridge with ath0, bad header length 88
 [ 3149.928220] bridge-ath0: interface ath0 is not a valid Ethernet interface
 [ 3149.928815] bridge-ath0: can't bridge with ath0, bad header length 88

modinfo wlan:

filename:       /lib/modules/2.6.24-19-generic/madwifi/wlan.ko
license:        Dual BSD/GPL
version:        0.9.4
description:    802.11 wireless LAN protocol support
author:         Errno Consulting, Sam Leffler
srcversion:     FE186501F5B510C26DF717C
depends:        
vermagic:       2.6.24-19-generic SMP mod_unload 586