Ticket #469 (closed defect: fixed)

Opened 20 months ago

Last modified 6 months ago

airbase-ng MTU problems

Reported by: hdm@… Owned by:
Priority: minor Milestone: 1.0
Component: airbase-ng Version: 1.0-dev
Keywords: Cc:

Description

I finally figured out the root cause behind the following error message:

write failed: Message too long
wi_write(): Illegal seek

What happens:

  • airmon-ng creates a new monitor VAP with the same MTU as the master interface (1500)
  • airbase-ng creates a new TUN/TAP interface with the same MTU (1500)
  • a packet gets sent through the TUN/TAP thats close to max frame size
  • airbase-ng sticks the injection header on it and writes it to the card
  • the card sees a frame larger than the configured MTU and rejects it
  • the error message above is printed and the packet is dropped
  • the guy writing the app using the TUN/TAP interfaces swears alot :-)

The workaround is to increase the MTU of the master interface or decrease the MTU of the TUN/TAP. The MTU of the monitor mode interface should be the cards max (~2300?), while the MTU of the TUN/TAP should still be the normal ethernet max (1500 ~ 1518/1522). Setting the MTU manually fixes the problem.

Attachments

Change History

Changed 20 months ago by hdm@…

On second thought, setting the MTU of the TUN/TAP to be smaller than normal just won't work, since frames of normal size coming back from the monitor interface will get dropped. The monitor interface really needs to have a higher MTU

Changed 20 months ago by netrolller3d

In an ideal world, we could use an MTU of 2347 bytes for the monitor interface (2347 is the MTU of the 802.11 standard), but some drivers cause a kernel panic when fed with packets larger than 2000 bytes. A better setting would be 1800.

As a workaround, try running "ifconfig <interface> mtu 1800" on the monitor interface. (If this works, I will incorporate it into airmon-ng.)

Changed 19 months ago by misterx

  • status changed from new to closed
  • resolution set to fixed

Should be solved in recent revision. Reopen the ticket if it's not the case.

Changed 18 months ago by sti@…

It's a know bug, but many times it just gets a SIOCSIFMTU error with invalid argument, so the resolution does not solve it at all.

Changed 18 months ago by hirte

The MTU setting is just in there for those cases where you won't get a SIOCSIFMTU error, for all the other generic cases i added fragmentation support. Airbase-ng automatically generates fragments in case the size of the frame coming from the tun/tap interface won't fit through the wireless interface after encryption and wireless header encapsulation. This should fix all problems concerning the MTU setting of both interfaces and the increasing frame size due to LAN->WLAN conversion.

Add/Change #469 (airbase-ng MTU problems)

Author


E-mail address and user name can be saved in the Preferences.


Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.