1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

293 Commits

Author SHA1 Message Date
Martine Lenders
178c3169d7 gnrc_sixlowpan_frag: use IPv6 type for reassembled packet 2016-03-12 10:45:03 +01:00
Cenk Gündoğan
ba7d6230c0 Merge pull request #4935 from authmillenon/gnrc_sixlowpan_iphc_nhc/fix/frag
gnrc_sixlowpan_iphc_nhc: fix NHC UDP decoding for fragmented packets
2016-03-11 16:41:27 +01:00
Martine Lenders
ae52bf9a12 gnrc_sixlowpan_iphc_nhc: fix NHC UDP decoding for fragmented packets 2016-03-04 16:40:45 +01:00
Martine Lenders
4504e40fe0 Merge pull request #4771 from Yonezawa-T2/rbuf_gc_improvement
rbuf: does not remove oldest entry if we have entry for current fragment
2016-03-04 05:40:00 +01:00
Yonezawa-T2
31fa3404ca rbuf: does not remove oldest entry if we have entry for current fragment
If all rbuf slots are in use, `_rbuf_gc` removes the oldest entry even if the
entry for the current fragment exists. This effectively decreases usable slots
by one. This patch makes `_rbuf_gc` removes the oldest entry only if there is
no entry for the current fragment.
2016-03-03 11:19:48 +09:00
Cenk Gündoğan
10cb4d66bf Merge pull request #4870 from authmillenon/ipv6_addr/enh/opt
ipv6_addr: optimize for size
2016-03-02 22:04:32 +01:00
Martine Lenders
ac07862363 Merge pull request #4796 from gebart/pr/udp-nhc-typo
6lo: Fix typo in UDP NHC checksum elision bit define
2016-03-01 21:54:32 +01:00
Martine Lenders
0e32745b8a gnrc: replace static initializers with constants where sensible 2016-03-01 18:29:15 +01:00
Joakim Nohlgård
647c87c9a5 6lo: Fix typo in UDP NHC checksum elision bit define 2016-03-01 12:35:14 +01:00
ded39b461e sys: random: rename genrand_* to random_* 2016-02-29 21:33:17 +01:00
Yonezawa-T2
984e02a7ff rbuf: made RBUF_INT_SIZE configurable 2016-02-29 13:02:32 +09:00
Cenk Gündoğan
0ac4ee705c ipv6: rpl: add source routing header for RPL 2016-02-27 20:39:12 +01:00
Oleg Hahm
0a65d8c558 Merge pull request #4770 from Yonezawa-T2/rbuf_usec
rbuf: change arrival time unit from seconds to microseconds
2016-02-16 11:38:06 +01:00
Yonezawa-T2
d5a02b6de1 rbuf: change arrival time unit from seconds to microseconds 2016-02-16 17:22:25 +09:00
Martine Lenders
379703ae3a gnrc: use gnrc_pkt_search_type instead of LL_SEARCH_SCALAR 2016-02-11 01:05:02 +01:00
Yonezawa-T2
f638d68ebb rbuf: drop overlapped fragment only if offset or size differs from previous one.
https://tools.ietf.org/html/rfc4944#section-5.3 says:

> If a link fragment that overlaps another fragment is received, as
> identified above, and differs in either the size or datagram_offset
> of the overlapped fragment, the fragment(s) already accumulated in
> the reassembly buffer SHALL be discarded.  A fresh reassembly may be
> commenced with the most recently received link fragment.
2016-02-09 11:15:22 +09:00
Oleg Hahm
250c288929 6lowpan nd: prefer NCEs over FIB entries
If an address can be found in the neighbor cache, it should be used - whatever the FIB may return.
2016-01-29 18:56:03 +01:00
Martine Lenders
da5abe1bcd gnrc_sixlowpan_nd: use gnrc_ipv6_nc_get_l2_addr() 2016-01-26 10:19:16 +01:00
Yonezawa-T2
5cb904b57e gnrc_sixlowpan_nd: fixed crash on gnrc_sixlowpan_nd_next_hop_l2addr.
When `gnrc_ndp_node_next_hop_l2addr` cannot resolve L2 address, it creates a
temporary neighbor cache entry with interface `KERNEL_PID_UNDEF` (unless the
interface is already known) to send a neighbor solicitation. When another packet
directed to the same address is going to sent before receiving a neighbor
advertisement, `gnrc_sixlowpan_nd_next_hop_l2addr` gets the temporary neighbor
cache entry and calls `gnrc_ipv6_netif_get` with `KERNEL_PID_UNDEF`, resulting
get a `NULL`. We must check `NULL` before dereference it.

FYI, both `gnrc_ndp_node_next_hop_l2addr` and
`gnrc_sixlowpan_nd_next_hop_l2addr` are enabled when
`gnrc_sixlowpan_border_router_default` module is enabled with `GNRC_NETIF_NUMOF`
is greater than 1:

gnrc_sixlowpan_border_router_default
→ gnrc_ipv6_router_default
→ gnrc_ndp_router (if GNRC_NETIF_NUMOF > 1)
→ gnrc_ndp_node
→ gnrc_ndp_node_next_hop_l2addr is called from _next_hop_l2addr

gnrc_sixlowpan_border_router_default
→ gnrc_sixlowpan_nd_border_router
→ gnrc_sixlowpan_nd_router
→ gnrc_sixlowpan_nd
→ gnrc_sixlowpan_nd_next_hop_l2addr is called from _next_hop_l2addr
2016-01-07 10:02:49 +09:00
Cenk Gündoğan
7d628514ab sixlowpan: iphc: fix dependencies for udp and nhc 2015-12-23 13:57:55 +01:00
Cenk Gündoğan
237706dd9e sixlowpan: iphc: remove dispatch and assign result to pkt 2015-12-22 20:54:39 +01:00
Martine Lenders
d342d35dd8 gnrc_sixlowpan: Fix IPHC/NHC packet order problem 2015-12-22 17:14:33 +01:00
Oleg Hahm
83649ddb59 Merge pull request #4531 from Yonezawa-T2/gnrc_avoid_infinite_loop
sixlowpan: fixed infinite loop
2015-12-22 11:11:55 +01:00
Yonezawa-T2
fe0e58dce1 gnrc_sixlowpan_nd: fixed crash when there are no routers 2015-12-22 11:29:57 +09:00
Yonezawa-T2
9108d2779d sixlowpan: fixed infinite loop
When prefix entry is resued, it may form a looped list, results in infinite loop
in gnrc_ndp_internal_send_rtr_adv.
This patch avoids looped lists.
2015-12-22 11:29:04 +09:00
Yonezawa-T2
c36766a31f OSX: fix warnings/errors thrown by clang on OS X
gnrc_ipv6_nc, gnrc_sixlowpan, gnrc_netdev2_eth, gnrc_ipv6, xbee, sixlowpan,
sc_gnrc_6ctx
2015-12-10 11:23:56 +09:00
Johann Fischer
a85d50b9d1 gnrc_sixlowpan_iphc.c: add nhc udp decoding and encoding
This patch adds UDP Header Compression and Decompression as
specified in https://tools.ietf.org/html/rfc6282#section-4.3
UDP NHC module will be included only if UDP is used.
2015-12-08 14:50:25 +01:00
Johann Fischer
199789ffbc gnrc_sixlowpan.c: fix warning if GNRC_SIXLOWPAN_FRAG module not used 2015-12-08 13:59:15 +01:00
Martine Lenders
15220b26ad Merge pull request #4381 from PeterKietzmann/sixlo_frag_unblocking
gnrc_sixlowpan_frag: Make fragmentation non-blocking
2015-12-08 13:13:48 +01:00
Hauke Petersen
41979b64cd sys: adapted to renamed THREAD FLAGS 2015-12-07 22:09:47 +01:00
PeterKietzmann
331fa34502 gnrc_sixlowpan_frag: msg based fragmentation 2015-12-07 17:49:02 +01:00
test
db7e8a7b37 sixlowpan: iphc: minor optimizations 2015-11-23 13:17:23 +01:00
Oleg Hahm
46dc908fcb gnrc 6lowpan: exclude CTX if not part of the app
This removes dependencies to 6LoWPAN context module if an application is built without support for it.

Also, includes a missing header.
2015-11-17 12:04:11 +01:00
Cenk Gündoğan
bf3a504691 nc: ndp: sixlowpan: remove timex.h include 2015-11-09 14:55:04 +01:00
Cenk Gündoğan
401e1b3814 sixlowpan: timex_t -> uint32_t 2015-11-09 14:55:04 +01:00
Cenk Gündoğan
47a02d9d07 ipv6: ndp: sixlowpan: remove vtimer includes 2015-11-02 15:02:08 +01:00
Cenk Gündoğan
3b825c2523 sixlowpan: use xtimer_now() instead of vtimer_now() 2015-10-28 21:15:11 +01:00
Cenk Gündoğan
023c0984b3 sixlowpan: switch ltimer to be an xtimer 2015-10-28 21:03:09 +01:00
Cenk Gündoğan
4297972054 nc: use xtimer for gnrc_ipv6_nc_t::nbr_sol_timer 2015-10-28 15:24:45 +01:00
Martine Lenders
493597ec1d Merge pull request #3845 from cgundogan/pr/gnrc_sixlowpan_iphc/assert
gnrc_sixlowpan_iphc: move assert to a valid position
2015-10-27 20:11:47 +01:00
Cenk Gündoğan
d587cf9cd4 netif: use xtimer for gnrc_ipv6_netif_t::rtr_sol_timer 2015-10-26 21:03:38 +01:00
Cenk Gündoğan
40e504de65 nc: use xtimer for gnrc_ipv6_nc_t::type_timeout 2015-10-22 15:55:46 +02:00
Cenk Gündoğan
beb3321132 nc: remove unused rtr_sol_timer 2015-10-20 19:05:42 +02:00
Martine Lenders
891450d29d gnrc_netapi: recover from message send errors 2015-09-29 16:58:08 +02:00
Oleg Hahm
57888f99a7 6lowpan: eliminate unused compiler warning
Fixes the bug that was introduced in b1ae07ca82 where the wrong datagram size was used.
2015-09-27 20:25:56 +02:00
DipSwitch
9b726fe217 6low_frag: Fix RSSI, LQI and flags dropping in fragmentation reassembly 2015-09-26 01:06:02 +02:00
Oleg Hahm
b1ae07ca82 6lowpan: replace duplicate function call
datagram_size is already set to the value returned by gnrc_pkt_len(), no need to call it again.
2015-09-25 22:42:28 +02:00
Martine Lenders
7bbb5d62b0 6lowpan IPHC: set dest context to DCI field not SCI 2015-09-24 23:21:15 +02:00
Oleg Hahm
63fda9e900 6lowpan: remove tentative flag for local addresses
There's no real need for this flag, but it causes problem during address registration.
2015-09-24 13:33:10 +02:00
Martine Lenders
5e2b4b6b23 Merge pull request #3951 from OlegHahm/6lowpan_nd_pio_fixes
6lowpan nd: PIO fixes
2015-09-24 02:52:45 +02:00
Martine Lenders
109b2ab522 Merge pull request #3950 from authmillenon/gnrc_sixlowpan_iphc/fix/set-mcast-ctx
gnrc_sixlowpan_iphc: actually set context for unicast prefix based comp
2015-09-24 02:33:16 +02:00
Oleg Hahm
9b7b1bae37 6lowpan: prefixes are initially all null pointers
Since the prefixes list stores pointers, one need to check for null pointers first.
2015-09-24 02:27:42 +02:00
Oleg Hahm
ba023aecb8 6lowpan nd: use correct upper limit for iterating
While iterating over the prefixes the wrong upper limit was used for the for loop.
2015-09-24 02:27:42 +02:00
Martine Lenders
1372b9b779 gnrc_sixlowpan_iphc: actually set context for unicast prefix based comp 2015-09-24 02:15:35 +02:00
Oleg Hahm
e9d6eb8170 6lowpan IPHC: set stateful compression mode f. dst
For destionation addresses the stateful compression mode bit wasn't set.
2015-09-24 02:15:21 +02:00
Martine Lenders
542c1e82ac gnrc_sixlowpan_nd: fix 6ctx option check 2015-09-22 14:36:44 +02:00
Martine Lenders
3448569eb8 Merge pull request #3916 from OlegHahm/6lowpan_rtr_adv_mc_timer
6lowpan nc: rtr sol timer expects an interface
2015-09-22 11:28:44 +02:00
Oleg Hahm
f0e2f50713 6lowpan nc: rtr sol timer expects an interface 2015-09-22 10:53:08 +02:00
Oleg Hahm
f3f4d61f93 sixlowpan nd: 6LBR shouldn't send rtr sol over 6lo 2015-09-21 23:21:22 +02:00
Oleg Hahm
682bde25d9 6lowpan nd: check right NCE in AR handling
When checking the address registration option, the address has to be passed in order to check the correct neighbor cache entry.
2015-09-21 09:25:12 +02:00
Oleg Hahm
effe7bbde0 6lowpan: 6LBR need to initialize rtr adv interval 2015-09-20 21:42:20 +02:00
Martine Lenders
f3b9e5fa8e gnrc_sixlowpan_nd_router: cast before shifting
`avr-gcc` was complaining about shifting the value out of the width of
type. This is a fix for that.
2015-09-20 16:04:30 +02:00
Martine Lenders
b3c16b3abc Merge pull request #3892 from authmillenon/gnrc_sixlowpan_nd/fix/nd-state-machine
gnrc_sixlowpan_nd: activate NC state machine
2015-09-19 04:04:45 +02:00
Martine Lenders
802e229bcb gnrc_sixlowpan_nd: register new addresses for AAC 2015-09-18 00:23:12 +02:00
Martine Lenders
1682b76866 gnrc_ndp_internal: adapt nbr_sol send function to get src 2015-09-18 00:23:12 +02:00
Martine Lenders
79c1240590 gnrc_sixlowpan_nd: activate NC state machine 2015-09-18 00:12:19 +02:00
Oleg Hahm
d8824bd0c5 6lowpan nd: tentative NCE is like no NCE 2015-09-17 12:47:56 +02:00
Oleg Hahm
3c6202e8ed sixlowpan nd: ignore empty eui64 in neighbor cache 2015-09-17 11:11:26 +02:00
Oleg Hahm
d7546d0f0c sixlowpan nd: add missing breaks for switch-case 2015-09-17 11:11:26 +02:00
Martine Lenders
108043594a Merge pull request #3846 from OlegHahm/6lbr_address_resolution
6lowpan nd: always perform l2 lookup for 6LBR
2015-09-17 10:14:12 +02:00
Martine Lenders
371240e8de Merge pull request #3874 from authmillenon/gnrc_sixlowpan_nd/fix/resched-nbr-sol
gnrc_sixlowpan_nd: fix reschedule of neighbor solicitations
2015-09-17 10:07:41 +02:00
Oleg Hahm
60be8fac83 sixlowpan nd: check for a potential NCE first 2015-09-17 08:56:28 +02:00
Oleg Hahm
3fee605300 6lowpan nd: always perform l2 lookup for 6LBR 2015-09-17 08:47:56 +02:00
Martine Lenders
1761b7b648 Merge pull request #3873 from OlegHahm/sixlowpan_nd_router_lifetime
6lowpan nd: set router lifetime to a default value
2015-09-17 02:30:31 +02:00
Oleg Hahm
a1158092a4 sixlowpan nd: move set_rtr_adv function to router 2015-09-17 02:08:52 +02:00
Martine Lenders
a19a04c753 Merge pull request #3853 from OlegHahm/6lowpan_nd_router_fixes
6lowpan nd router fixes
2015-09-17 01:37:39 +02:00
Martine Lenders
b1e98e3337 gnrc_sixlowpan_nd: fix reschedule of neighbor solicitations 2015-09-17 01:28:11 +02:00
Oleg Hahm
b28dd897f2 6lowpan nd: set router lifetime to a default value 2015-09-17 01:23:37 +02:00
Oleg Hahm
dbb754e131 6lbr: check registered flag only for 6LoWPAN ifs 2015-09-16 23:58:55 +02:00
Oleg Hahm
596ef55641 6lowpan nd: join all routers multicast group
A 6LR should join the all routers multicast group as soon as it turns
into a router which is indicated by setting the router advertisement
flag.
2015-09-16 23:53:08 +02:00
Cenk Gündoğan
12bcc46f15 gnrc_sixlowpan_iphc: move assert to a valid position 2015-09-16 09:54:08 +02:00
Oleg Hahm
dc225e2861 6lowpan nd: check for link-local first 2015-09-11 22:56:23 +02:00
Martine Lenders
4da5c8095c gnrc: adapt for gnrc_sixlowpan_nd_border_router 2015-09-11 16:45:43 +02:00
Martine Lenders
e6c96cde53 gnrc_sixlowpan_nd_border_router: initial import 2015-09-11 16:45:38 +02:00
Martine Lenders
a6625e86d3 gnrc_sixlowpan: document behavior for blackbox testing 2015-09-11 11:28:33 +02:00
Martine Lenders
639fd0068e Merge pull request #3807 from OlegHahm/sixlowpan_nd_rtr_sol
gnrc: 6lowpan: router solicitation retransmission fixes
2015-09-10 13:54:56 +02:00
Oleg Hahm
46939f9c25 6lowpan: boundaries for rtr sol retransmissions
Also avoid setting the retransmission time to 0.
2015-09-10 13:16:17 +02:00
Martine Lenders
132f5e1b9c gnrc_sixlowpan_nd_router: initial import 2015-09-10 02:13:44 +02:00
Martine Lenders
2a1c243ad2 gnrc_sixlowpan_nd: initial import 2015-09-08 20:37:36 +02:00
Martine Lenders
52c57be621 gnrc_sixlowpan: don't send packets that exceed maximum datagram size 2015-08-21 22:51:54 +02:00
Martine Lenders
ab9d57dec5 gnrc_sixlowpan_iphc: set correct length for IPv6 header 2015-08-20 12:35:44 +02:00
Martine Lenders
6dc125e08b gnrc_sixlowpan: compare with actual packet size for fragmentation
Not with the uncompressed version
2015-08-19 17:51:54 +02:00
Martine Lenders
58ff31bfe9 gnrc: make all gnrc modules sub-modules of gnrc 2015-08-18 23:00:07 +02:00