Always use uip_ds6_select_src when sending back an icmp error

This commit is contained in:
Laurent Deru 2017-12-11 17:43:52 +01:00
parent 1549a55e42
commit ebb1f5475e

View File

@ -238,12 +238,8 @@ uip_icmp6_error_output(uint8_t type, uint8_t code, uint32_t param) {
return;
}
} else {
#if UIP_CONF_ROUTER
/* need to pick a source that corresponds to this node */
uip_ds6_select_src(&UIP_IP_BUF->srcipaddr, &tmp_ipaddr);
#else
uip_ipaddr_copy(&UIP_IP_BUF->srcipaddr, &tmp_ipaddr);
#endif
}
UIP_ICMP_BUF->type = type;