Insert properly Hop-by-Hop option at first hop
This commit is contained in:
parent
2dfe2c377f
commit
d45782fbcd
|
@ -1547,10 +1547,6 @@ uip_process(uint8_t flag)
|
|||
|
||||
uip_appdata = &uip_buf[UIP_LLH_LEN + UIP_IPTCPH_LEN];
|
||||
|
||||
#if UIP_CONF_IPV6_RPL
|
||||
rpl_insert_header();
|
||||
#endif /* UIP_CONF_IPV6_RPL */
|
||||
|
||||
#if UIP_UDP_CHECKSUMS
|
||||
/* Calculate UDP checksum. */
|
||||
UIP_UDP_BUF->udpchksum = ~(uip_udpchksum());
|
||||
|
@ -1558,6 +1554,11 @@ uip_process(uint8_t flag)
|
|||
UIP_UDP_BUF->udpchksum = 0xffff;
|
||||
}
|
||||
#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 */
|
||||
|
|
|
@ -348,12 +348,8 @@ rpl_invert_header(void)
|
|||
void
|
||||
rpl_insert_header(void)
|
||||
{
|
||||
uint8_t uip_ext_opt_offset;
|
||||
if(default_instance != NULL) {
|
||||
uip_ext_opt_offset = 2;
|
||||
if(UIP_EXT_HDR_OPT_BUF->type == UIP_EXT_HDR_OPT_RPL) {
|
||||
rpl_update_header_empty();
|
||||
}
|
||||
if(default_instance != NULL && !uip_is_addr_mcast(&UIP_IP_BUF->destipaddr)) {
|
||||
rpl_update_header_empty();
|
||||
}
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
|
Loading…
Reference in a new issue