mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/fix_crash_when_send_udp_too_big_v3.1' into 'release/v3.1'
lw-ip: Drop packets larger than MTU (backport v3.1) See merge request espressif/esp-idf!7291
This commit is contained in:
commit
9ebf0bb363
@ -85,7 +85,7 @@ config LWIP_DHCP_MAX_NTP_SERVERS
|
|||||||
|
|
||||||
config LWIP_IP_FRAG
|
config LWIP_IP_FRAG
|
||||||
bool "Enable fragment outgoing IP packets"
|
bool "Enable fragment outgoing IP packets"
|
||||||
default n
|
default y
|
||||||
help
|
help
|
||||||
Enabling this option allows fragmenting outgoing IP packets if their size
|
Enabling this option allows fragmenting outgoing IP packets if their size
|
||||||
exceeds MTU.
|
exceeds MTU.
|
||||||
|
@ -980,6 +980,8 @@ ip4_output_if_opt_src(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *d
|
|||||||
if (netif->mtu && (p->tot_len > netif->mtu)) {
|
if (netif->mtu && (p->tot_len > netif->mtu)) {
|
||||||
return ip4_frag(p, netif, dest);
|
return ip4_frag(p, netif, dest);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
LWIP_ERROR("ip4_output_if: Packets larger than MTU, discarded!!!",!(netif->mtu && p->tot_len > netif->mtu),return ERR_IF;);
|
||||||
#endif /* IP_FRAG */
|
#endif /* IP_FRAG */
|
||||||
|
|
||||||
LWIP_DEBUGF(IP_DEBUG, ("ip4_output_if: call netif->output()\n"));
|
LWIP_DEBUGF(IP_DEBUG, ("ip4_output_if: call netif->output()\n"));
|
||||||
|
Loading…
Reference in New Issue
Block a user