mirror of
https://github.com/apache/nuttx.git
synced 2026-05-13 02:18:38 +08:00
4ac44bc8b5
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>