mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-09-20 14:03:38 +08:00
Verify min MTU for IPv6 packet too big
Bug #68610, Reported by Daniel Birtwhistle
This commit is contained in:
@@ -947,9 +947,14 @@ nd6_input(struct pbuf *p, struct netif *inp)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pmtu = lwip_htonl(icmp6hdr->data) & 0xFFFF;
|
||||||
|
if (pmtu < IP6_MIN_MTU_LENGTH) {
|
||||||
|
/* MTU too small */
|
||||||
|
pbuf_free(p);
|
||||||
|
return;
|
||||||
|
}
|
||||||
/* Change the Path MTU. */
|
/* Change the Path MTU. */
|
||||||
pmtu = lwip_htonl(icmp6hdr->data);
|
destination_cache[dest_idx].pmtu = (u16_t)pmtu;
|
||||||
destination_cache[dest_idx].pmtu = (u16_t)LWIP_MIN(pmtu, 0xFFFF);
|
|
||||||
|
|
||||||
break; /* ICMP6_TYPE_PTB */
|
break; /* ICMP6_TYPE_PTB */
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user