mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-01-21 23:31:11 +00:00
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];
|
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
|
#if UIP_UDP_CHECKSUMS
|
||||||
/* Calculate UDP checksum. */
|
/* Calculate UDP checksum. */
|
||||||
UIP_UDP_BUF->udpchksum = ~(uip_udpchksum());
|
UIP_UDP_BUF->udpchksum = ~(uip_udpchksum());
|
||||||
@ -1558,6 +1554,11 @@ uip_process(uint8_t flag)
|
|||||||
UIP_UDP_BUF->udpchksum = 0xffff;
|
UIP_UDP_BUF->udpchksum = 0xffff;
|
||||||
}
|
}
|
||||||
#endif /* UIP_UDP_CHECKSUMS */
|
#endif /* UIP_UDP_CHECKSUMS */
|
||||||
|
|
||||||
|
#if UIP_CONF_IPV6_RPL
|
||||||
|
rpl_insert_header();
|
||||||
|
#endif /* UIP_CONF_IPV6_RPL */
|
||||||
|
|
||||||
UIP_STAT(++uip_stat.udp.sent);
|
UIP_STAT(++uip_stat.udp.sent);
|
||||||
goto ip_send_nolen;
|
goto ip_send_nolen;
|
||||||
#endif /* UIP_UDP */
|
#endif /* UIP_UDP */
|
||||||
|
@ -348,12 +348,8 @@ rpl_invert_header(void)
|
|||||||
void
|
void
|
||||||
rpl_insert_header(void)
|
rpl_insert_header(void)
|
||||||
{
|
{
|
||||||
uint8_t uip_ext_opt_offset;
|
if(default_instance != NULL && !uip_is_addr_mcast(&UIP_IP_BUF->destipaddr)) {
|
||||||
if(default_instance != NULL) {
|
rpl_update_header_empty();
|
||||||
uip_ext_opt_offset = 2;
|
|
||||||
if(UIP_EXT_HDR_OPT_BUF->type == UIP_EXT_HDR_OPT_RPL) {
|
|
||||||
rpl_update_header_empty();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user