Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

airbase-ng MTU problems #469

Closed
aircrack-ng opened this issue Mar 10, 2018 · 5 comments
Closed

airbase-ng MTU problems #469

aircrack-ng opened this issue Mar 10, 2018 · 5 comments
Milestone

Comments

@aircrack-ng
Copy link
Owner

@aircrack-ng aircrack-ng commented Mar 10, 2018

Reported by hdm on 21 Jul 2008 03:14 UTC

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.

@aircrack-ng

This comment has been minimized.

Copy link
Owner Author

@aircrack-ng aircrack-ng commented Mar 10, 2018

Comment by hdm on 21 Jul 2008 03:14 UTC

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

@aircrack-ng

This comment has been minimized.

Copy link
Owner Author

@aircrack-ng aircrack-ng commented Mar 10, 2018

Comment by netrolller3d on 21 Jul 2008 03:14 UTC

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 mtu 1800" on the monitor interface. (If this works, I will incorporate it into airmon-ng.)

@aircrack-ng

This comment has been minimized.

Copy link
Owner Author

@aircrack-ng aircrack-ng commented Mar 10, 2018

Comment by misterx on 21 Jul 2008 03:14 UTC

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

@aircrack-ng

This comment has been minimized.

Copy link
Owner Author

@aircrack-ng aircrack-ng commented Mar 10, 2018

Comment by sti on 21 Jul 2008 03:14 UTC

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.

@aircrack-ng

This comment has been minimized.

Copy link
Owner Author

@aircrack-ng aircrack-ng commented Mar 10, 2018

Comment by hirte on 21 Jul 2008 03:14 UTC

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.