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

arch/sim: fix MTU mismatch on TAP device in host route mode #7380

Merged
merged 1 commit into from Oct 21, 2022

Conversation

wengzhe
Copy link
Contributor

@wengzhe wengzhe commented Oct 21, 2022

Summary

In host route mode (bridge mode disabled), the d_pktsize of TAP device is not initialized and will be set to CONFIG_NET_ETH_PKTSIZE in netdev_register, while the MTU on host side keeps at 1500. Input packets larger than CONFIG_NET_ETH_PKTSIZE will be dropped because 'IP packet shorter than length in IP header'.
This patch fix this issue by reading MTU from host side and set as d_pktsize, just the same as what is done in bridge mode.

Impact

Netdriver in sim.

Testing

Tested on Ubuntu 22.04 x86_64, with actual HTTP stream.

In host route mode (bridge mode disabled), the d_pktsize of TAP device is not initialized and will be set to CONFIG_NET_ETH_PKTSIZE in netdev_register, while the MTU on host side keeps at 1500. Input packets larger than CONFIG_NET_ETH_PKTSIZE will be dropped because 'IP packet shorter than length in IP header'.
This patch fix this issue by reading MTU from host side and set as d_pktsize, just the same as what is done in bridge mode.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
@xiaoxiang781216 xiaoxiang781216 merged commit 4ac44bc into apache:master Oct 21, 2022
@jerpelea jerpelea added this to To-Add in Release Notes - 12.0.0 Dec 29, 2022
@jerpelea jerpelea moved this from To-Add to Added in Release Notes - 12.0.0 Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants