Make sure that the uip_ext_len is reset to 0 when sending ICMPv6 errors. If this is not done, the checksum functions might use invalid length values.
@@ -178,6 +178,7 @@ uip_icmp6_error_output(uint8_t type, uint8_t code, uint32_t param)
shift = UIP_IPH_LEN + UIP_ICMPH_LEN + UIP_ICMP6_ERROR_LEN;
uip_len += shift;
uip_len = MIN(uip_len, UIP_LINK_MTU);
+ uip_ext_len = 0;
memmove(uip_buf + shift, (void *)UIP_IP_BUF, uip_len - shift);
UIP_IP_BUF->vtc = 0x60;
