RPL: code cleanup (rpl-ext-header.c)

This commit is contained in:
Yasuyuki Tanaka 2016-06-27 20:57:48 +02:00
parent 13f18fd842
commit ffdc53718d

View File

@ -197,7 +197,11 @@ rpl_srh_get_next_hop(uip_ipaddr_t *ipaddr)
switch(*uip_next_hdr) { switch(*uip_next_hdr) {
case UIP_PROTO_HBHO: case UIP_PROTO_HBHO:
case UIP_PROTO_DESTO: case UIP_PROTO_DESTO:
case UIP_PROTO_FRAG: /*
* As per RFC 2460, only the Hop-by-Hop Options header and
* Destination Options header can appear before the Routing
* header.
*/
/* Move to next header */ /* Move to next header */
uip_next_hdr = &UIP_EXT_BUF->next; uip_next_hdr = &UIP_EXT_BUF->next;
uip_ext_len += (UIP_EXT_BUF->len << 3) + 8; uip_ext_len += (UIP_EXT_BUF->len << 3) + 8;
@ -244,7 +248,11 @@ rpl_process_srh_header(void)
switch(*uip_next_hdr) { switch(*uip_next_hdr) {
case UIP_PROTO_HBHO: case UIP_PROTO_HBHO:
case UIP_PROTO_DESTO: case UIP_PROTO_DESTO:
case UIP_PROTO_FRAG: /*
* As per RFC 2460, only the Hop-by-Hop Options header and
* Destination Options header can appear before the Routing
* header.
*/
/* Move to next header */ /* Move to next header */
uip_next_hdr = &UIP_EXT_BUF->next; uip_next_hdr = &UIP_EXT_BUF->next;
uip_ext_len += (UIP_EXT_BUF->len << 3) + 8; uip_ext_len += (UIP_EXT_BUF->len << 3) + 8;