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:
Simon Goldschmidt 2023-09-27 21:49:24 +02:00
parent f7fe057821
commit d8b97bfc5d

View File

@ -213,6 +213,7 @@ icmp_input(struct pbuf *p, struct netif *inp)
ip4_addr_copy(iphdr->src, *src);
ip4_addr_copy(iphdr->dest, *ip4_current_src_addr());
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__NETIF_CHECKSUM_ENABLED(inp, NETIF_CHECKSUM_GEN_ICMP) {
/* adjust the checksum */