Commit Graph

51 Commits

Author SHA1 Message Date
Simon Duquennoy
d73b229624 Fix and cleanup RPL ext header handling 2016-06-29 17:26:01 +02:00
Yasuyuki Tanaka
ffdc53718d RPL: code cleanup (rpl-ext-header.c) 2016-06-27 20:57:48 +02:00
Yasuyuki Tanaka
13f18fd842 RPL: update uip_ext_len whenever moving to next header (rpl-ext-header.c) 2016-06-27 20:57:48 +02:00
Yasuyuki Tanaka
5a79bad4b1 RPL: prevent unintended memory access (rpl_remove_header)
When it goes to the default label in the switch statement of
rpl_remove_header(), UIP_EXT_BUF does not always point to an IPv6 extension
header. "Move to next header" process should be done only in case of
UIP_PROTO_DESTO. Otherwise, it returns with doing nothing.
2016-06-27 20:57:48 +02:00
Yasuyuki Tanaka
e361c49f14 RPL non-storing: fix a bug causing an infinite loop
It falls into an infinite loop if it goes to the default label in the switch
statement of rpl_srh_get_next_hop() or rpl_process_srh_header().
2016-06-27 20:57:48 +02:00
Tommy Sparber
27cceda1e8
rpl-ext-header: Use 8-octet unit for HBHO length
According to RFC 2460 the length field of the Hop-by-Hop options header
should use a 8-octet unit (multiple of 8 byte).

In a normal configuration the RPL_HOP_BY_HOP_LEN define is 8, so the
current implementation works, but if RPL_HOP_BY_HOP_LEN is a multiple
of 8 the length is not calculated correctly.
2016-06-08 17:37:59 +02:00
Simon Duquennoy
6cdec70798 rpl_verify_header: do not select DAG in storing mode after updating neighbor rank, as this may result in a No-Path DAO being sent, which will drop the current packet. 2016-06-08 14:03:26 +02:00
Simon Duquennoy
f26ea34c61 Run RPL regression tests in non-storing mode 2016-06-08 14:03:19 +02:00
Yasuyuki Tanaka
bb69e35c76 Fix typos causing compilation errors in rpl_srh_get_next_hop() 2016-06-08 14:02:51 +02:00
Yasuyuki Tanaka
f53bae6225 Remove a debug message showing "SRH Next Hop" in insert_srh_header() 2016-06-08 14:02:50 +02:00
Yasuyuki Tanaka
2abf27a6f7 Remove an unnecessary NULL-check in insert_srh_header() 2016-06-08 14:02:49 +02:00
Yasuyuki Tanaka
97a362acdc Use a stricter check in rpl_srh_get_next_hop() 2016-06-08 14:02:48 +02:00
Yasuyuki Tanaka
0be30628ce Enable the root to send back a DAO-ACK 2016-06-08 14:02:47 +02:00
Simon Duquennoy
b3e31e1456 Implement RPL non-storing mode 2016-06-08 14:02:45 +02:00
Simon Duquennoy
75967438e3 RPL ext header: check if sender is closer only after updating its rank 2016-06-03 16:44:11 +02:00
Simon Duquennoy
79c436ac03 rpl_verify_header: sanity-check 'sender' before updating rank 2015-11-16 11:15:36 +01:00
Simon Duquennoy
a7ce312ee3 Enhanced RPL loop repair: send unicast DIO to source when detecting a loop from ext header, update rank along the path (when rank error is signaled) 2015-09-17 22:53:12 +02:00
Nicolas Tsiftes
7d06494331 Merge pull request #917 from cetic/pr-hbh-user-conf
Allow user configuration of RPL hop-by-hop option
2015-04-03 22:19:51 +02:00
Laurent Deru
0efa9f2046 Allow user configuration of RPL hop-by-hop option 2015-04-03 09:52:36 +02:00
Nicolas Tsiftes
f2f49f18f5 Merge pull request #913 from cetic/pr-rpl-stats
Fix and add more RPL stats
2014-12-19 22:15:38 +01:00
Laurent Deru
bb1e0c1cbc Add missing return values in rpl_update_header_empty() 2014-12-19 11:23:19 +01:00
Laurent Deru
ccbfa388f6 Add more RPL stats 2014-12-19 10:51:03 +01:00
Simon Duquennoy
e6d758e6f5 Remove now unneeded UIP_CONF_IPV6 guards in net/ipv6 and net/rpl code 2014-12-01 20:13:09 +01:00
Laurent Deru
29f894c07e Drop forwarding error packet and send back DAO to originating parent 2014-11-14 09:40:05 +01:00
Laurent Deru
a964380155 Rank error packet should not be forwarded 2014-11-14 09:40:04 +01:00
Laurent Deru
778d40dab7 Do not trigger global repair when forwarding error is detected 2014-11-14 09:40:04 +01:00
Enrico Joerns
85b494c16b [doc] Give files a common structure by placing license first (partial)
Followed by doxyen file and group tags.
This patch is only a first attempt to make provide a clean structure,
many more files require rework, too.
2014-11-10 23:54:49 +01:00
Laurent Deru
02972e6514 Improve RPL hop-by-hop option detection 2014-06-27 09:45:57 +02:00
Laurent Deru
d45782fbcd Insert properly Hop-by-Hop option at first hop 2014-06-27 09:45:51 +02:00
Laurent Deru
2dfe2c377f Setting uip_ext_len again breaks hop-by-hop option 2014-06-27 09:43:53 +02:00
Laurent Deru
b6742e5eb5 Sender rank in Hop-by-Hop option has inverted bytes 2014-06-27 09:43:53 +02:00
Rémy Léone
25c8b0835d Closing doxygen groups 2014-05-30 11:01:20 +02:00
Adam Dunkels
5f3fe7f7c7 Updated include paths for the moved files under net/ 2014-01-26 23:20:23 +01:00
Adam Dunkels
b0460317b8 Moved variable declaration to the start of the function block 2013-11-24 15:17:52 +01:00
Adam Dunkels
0ed7db0f9b Slight improvements in debug messages 2013-11-24 15:17:52 +01:00
Sébastien Dawans
78e807403c Inserts missing IPv6 Hop-By-Hop RPL Option at first hop 2013-08-19 21:40:24 +02:00
Adam Dunkels
86e247025a Removed debugging printout that came before a local variable declaration, which seems to have broken sdcc 2013-08-19 17:48:33 +02:00
Adam Dunkels
34119b7ef2 Poor man's loop reparation: reset the DIO timer and hope the neighbor learns a better route. 2013-08-19 17:48:32 +02:00
Adam Dunkels
d830e9df3f Implement forwarding error handling: if a packet changes direction, we set the FWD_ERR flag. If we see the FWD_ERR flag, we drop the route that we sent it to. If we are the root node, we also initiate a global repair. 2013-08-19 17:48:31 +02:00
Adam Dunkels
a027832f94 Fixed a bunch of compiler warnings 2013-08-19 17:48:31 +02:00
Adam Dunkels
927cc8d895 Added #if UIP_CONF_IPV6 around the IPv6 code in the uIP source tree to allow the C files to be compiled even if IPv6 is not configured. 2013-03-18 09:45:30 +01:00
Adam Dunkels
357b13b3d3 Correctly handle upward and downward routes according to Section 1.2 of RFC6550 2012-11-27 23:04:31 +01:00
Adam Dunkels
db7cb567f5 Updated the RPL code to better match the Contiki code style 2012-11-27 23:04:30 +01:00
Joakim Eriksson
6ee05f4a2d fixed loop detection bug in RPL 2012-01-13 05:37:30 -08:00
Joakim Eriksson
237100f6fa changed so that ext hdr len code checks against buffer size instead of link mtu 2012-01-10 15:51:06 +01:00
Nicolas Tsiftes
23a280e5eb Refactored loop detection. 2011-12-02 16:16:42 +01:00
Nicolas Tsiftes
ac869185c0 Refactored header management. 2011-12-02 15:55:07 +01:00
Nicolas Tsiftes
7c808081d6 Coding style 2011-11-23 14:36:50 +01:00
nvt
e11b7d4fb6 Removed redundant code 2011-11-22 14:18:32 +01:00
Nicolas Tsiftes
ea73f1d767 Do not force DIO reset on certain events where it is not needed. 2011-11-16 09:49:22 +01:00