mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-14 18:36:27 +00:00
icmp: fix bug #64211 (ICMP reply error when using bridge)
when reusing an rx pbuf for tx, its if_idx has to be reset or else bridgeif_send_to_port() might drop it
This commit is contained in:
parent
f7fe057821
commit
d8b97bfc5d
@ -213,6 +213,7 @@ icmp_input(struct pbuf *p, struct netif *inp)
|
|||||||
ip4_addr_copy(iphdr->src, *src);
|
ip4_addr_copy(iphdr->src, *src);
|
||||||
ip4_addr_copy(iphdr->dest, *ip4_current_src_addr());
|
ip4_addr_copy(iphdr->dest, *ip4_current_src_addr());
|
||||||
ICMPH_TYPE_SET(iecho, ICMP_ER);
|
ICMPH_TYPE_SET(iecho, ICMP_ER);
|
||||||
|
p->if_idx = NETIF_NO_INDEX; /* we're reusing this pbuf, so reset its if_idx */
|
||||||
#if CHECKSUM_GEN_ICMP
|
#if CHECKSUM_GEN_ICMP
|
||||||
IF__NETIF_CHECKSUM_ENABLED(inp, NETIF_CHECKSUM_GEN_ICMP) {
|
IF__NETIF_CHECKSUM_ENABLED(inp, NETIF_CHECKSUM_GEN_ICMP) {
|
||||||
/* adjust the checksum */
|
/* adjust the checksum */
|
||||||
|
Loading…
Reference in New Issue
Block a user