mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-22 10:30:13 +00:00
uip_icmp6_error_output: remove and add RPL ext header instead of inverting it, so that the payload of the returned ICMP error matches the original packet
This commit is contained in:
parent
9930756d7c
commit
5886bdea31
@ -220,8 +220,8 @@ uip_icmp6_error_output(uint8_t type, uint8_t code, uint32_t param) {
|
||||
}
|
||||
|
||||
#if UIP_CONF_IPV6_RPL
|
||||
uip_ext_len = rpl_invert_header();
|
||||
#else /* UIP_CONF_IPV6_RPL */
|
||||
rpl_remove_header();
|
||||
#else
|
||||
uip_ext_len = 0;
|
||||
#endif /* UIP_CONF_IPV6_RPL */
|
||||
|
||||
@ -280,6 +280,10 @@ uip_icmp6_error_output(uint8_t type, uint8_t code, uint32_t param) {
|
||||
UIP_ICMP_BUF->icmpchksum = 0;
|
||||
UIP_ICMP_BUF->icmpchksum = ~uip_icmp6chksum();
|
||||
|
||||
#if UIP_CONF_IPV6_RPL
|
||||
rpl_insert_header();
|
||||
#endif /* UIP_CONF_IPV6_RPL */
|
||||
|
||||
UIP_STAT(++uip_stat.icmp.sent);
|
||||
|
||||
PRINTF("Sending ICMPv6 ERROR message type %d code %d to ", type, code);
|
||||
|
Loading…
Reference in New Issue
Block a user