diff --git a/core/net/ip/tcpip.c b/core/net/ip/tcpip.c index df3f0608d..faee7e9e5 100644 --- a/core/net/ip/tcpip.c +++ b/core/net/ip/tcpip.c @@ -548,6 +548,10 @@ tcpip_ipv6_output(void) return; } +#if UIP_CONF_IPV6_RPL + rpl_insert_header(); +#endif /* UIP_CONF_IPV6_RPL */ + if(!uip_is_addr_mcast(&UIP_IP_BUF->destipaddr)) { /* Next hop determination */ diff --git a/core/net/ipv6/uip-icmp6.c b/core/net/ipv6/uip-icmp6.c index d246a4d58..466627a98 100644 --- a/core/net/ipv6/uip-icmp6.c +++ b/core/net/ipv6/uip-icmp6.c @@ -160,11 +160,6 @@ echo_request_input(void) uip_ext_len = 0; } - /* Insert RPL extension headers */ -#if UIP_CONF_IPV6_RPL - rpl_insert_header(); -#endif /* UIP_CONF_IPV6_RPL */ - /* Below is important for the correctness of UIP_ICMP_BUF and the * checksum */ @@ -260,10 +255,6 @@ 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); @@ -301,9 +292,6 @@ uip_icmp6_send(const uip_ipaddr_t *dest, int type, int code, int payload_len) UIP_STAT(++uip_stat.icmp.sent); UIP_STAT(++uip_stat.ip.sent); -#if UIP_CONF_IPV6_RPL - rpl_insert_header(); -#endif /* UIP_CONF_IPV6_RPL */ tcpip_ipv6_output(); } /*---------------------------------------------------------------------------*/ diff --git a/core/net/ipv6/uip6.c b/core/net/ipv6/uip6.c index 94f4dfcf9..0ce97d610 100644 --- a/core/net/ipv6/uip6.c +++ b/core/net/ipv6/uip6.c @@ -1582,10 +1582,6 @@ uip_process(uint8_t flag) } #endif /* UIP_UDP_CHECKSUMS */ -#if UIP_CONF_IPV6_RPL - rpl_insert_header(); -#endif /* UIP_CONF_IPV6_RPL */ - UIP_STAT(++uip_stat.udp.sent); goto ip_send_nolen; #endif /* UIP_UDP */