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

6517 Commits

Author SHA1 Message Date
Jose Alamos
6beec0a4f6 netopt: update doc of NETOPT_LINK 2019-10-30 12:13:36 +01:00
Jose Alamos
43a5fdc870 netopt: rename NETOPT_LINK_CONNECTED 2019-10-30 12:13:36 +01:00
benpicco
422d6d5f1a
Merge pull request #12582 from aabadie/pr/sys/sha_dead_assignment
sys/sha3: fix dead assignment of blockSize in Keccak_update
2019-10-27 13:05:16 +01:00
aaadaccc3f
sys/net/nanocoap: fix dead assignment in nanocoap server 2019-10-27 10:49:41 +01:00
74919d0646
sys/sha3: fix dead assignment of blockSize in Keccak_update 2019-10-27 10:44:54 +01:00
Gunar Schorcht
e38d3e24ec
Merge pull request #12548 from maribu/c11_atomcis_cpp_compat
sys: Basic C++ compatibility with C11 atomcis
2019-10-25 11:48:58 +02:00
d8d7f77b7d
Merge pull request #12567 from aabadie/pr/sys/riotboot_remove_unused_variable
sys/flashwrite: remove useless line
2019-10-25 10:26:07 +02:00
Marian Buschsieweke
cd8562e8c0
sys: Added basic C++ compat for C11 atomics
Added a header to allow defining C interfaces using the default C11 atomic
types. Those types are however fully opaque and inaccessible from C++, as C11
atomics are completely incompatible with C++.
2019-10-24 23:08:35 +02:00
benpicco
afecb9aa7a
Merge pull request #12562 from kaspar030/pr/suit_v4_nanocbor
sys/suit/v4: switch to nanocbor
2019-10-24 19:15:25 +02:00
Marian Buschsieweke
1c624e457c
Merge pull request #10592 from gschorcht/sys_arduino_ext
sys/arduino: Added Wire (I2C) interface
2019-10-24 18:28:11 +02:00
Francisco
0364c39694
Merge pull request #12408 from miri64/gnrc_netif/fix/src-addr-selection
gnrc_netif: only use prefix matching as tie-breaker in source selection
2019-10-24 17:14:17 +02:00
4ccb4e5995 sys/suit/v4: switch to nanocbor
Co-authored-by: Francisco <femolina@uc.cl>
2019-10-24 16:48:00 +02:00
Martine S. Lenders
e9d75f5655 gnrc_netif: remove filter parameter from _match_to_idx()
`_match_to_idx()` was removed from source address selection (which was
the only one setting the filter parameter to a non-NULL value), so it
is the parameter is not needed anymore.
2019-10-24 16:04:41 +02:00
Martine S. Lenders
e787f6b60d gnrc_netif: only use prefix matching as tie-breaker in source selection
When source address selection is done, both RFC and comments in the code
state, that a longest prefix match should *only* be used as a
tie-breaker between more than one viable candidate. If there is only one
address, there is

a) no need for a tie-breaker
b) in the case of either the destination address or the single remaining
   address being ULAs ([which are considered to be of global scope]
   [RFC4193]) possibly not matching, as `fd00::/7` and e.g. `2001::/8`
   do not have a common prefix.

(b) in fact causes the match function to return -1, causing the source
address selection to return -1, causing the outer function to return the
first address it found (which most often is the link-local address),
causing e.g. a ping to an ULA to fail, even is there is a global
address.

[RFC4193]: https://tools.ietf.org/html/rfc4193
2019-10-24 16:04:41 +02:00
Cenk Gündoğan
e0ab8776f3
Merge pull request #12547 from miri64/gnrc_netif/enh/warn-no-ARSM
gnrc_netif: warn when not joining solicited-nodes from non-6LN netif
2019-10-24 13:46:38 +02:00
Martine Lenders
e990b26d5b
Merge pull request #12560 from miri64/gnrc_sixlowpan/cleanup/rb-remainders
gnrc_sixlowpan: move remaining reassembly buffer components to gnrc_sixlowpan_frag_rb
2019-10-24 13:38:55 +02:00
Vincent Dupont
3fb3b62ea2
Merge pull request #12507 from gschorcht/core/static_assert
core/assert: allow multiple static_asserts within a function
2019-10-24 13:38:00 +02:00
Martine Lenders
796d6a3167 gnrc_sixlowpan: move garbage collect msg type to reassembly buffer 2019-10-24 12:41:29 +02:00
Martine Lenders
750fd30bb4 gnrc_sixlowpan_config: fix module doc for reassembly buffer config 2019-10-24 12:41:29 +02:00
Martine Lenders
0838199c36
Merge pull request #12555 from miri64/gnrc_pktbuf_static/enh/unify-ptr-stats
gnrc_pktbuf_static: unify NULL pointer output for stats
2019-10-24 09:09:19 +02:00
Gunar Schorcht
3fc2c60f20 sys/arduino: add Wire (I2C) library implementation 2019-10-24 08:33:49 +02:00
Martine Lenders
41708d9f03 gnrc_pktbuf_static: unify NULL pointer output for stats
Different platforms evaluate `printf()` for NULL pointers differently,
resulting tests checking for a certain output to fail. This unifies that
(debug) output for the static packet buffer statistics.
2019-10-23 14:56:29 +02:00
d22ddc1e95
usbus: Fix usb, initialization and detected spelling mistakes
This commit fixes a number of difficult words in the USB stack and
related test files.
2019-10-23 10:43:52 +02:00
063ee3352c
usbus/control: fix spelling errors in control slicer 2019-10-23 10:40:02 +02:00
Dylan Laduranty
0bbb114ec6
Merge pull request #12534 from bergzand/pr/usbus/cdcecm_early_exit_on_inactive
cdcecm: early exit on inactive usb interface
2019-10-23 10:09:11 +02:00
45745579bc
cdcecm: early exit on inactive usb interface
This adds an early exit when the usb interface with the data endpoints
is not activated. This prevents the cdc_ecm_netdev code from attempting
to send the PDU when the USB device is not yet initialized or activated
by a host.
2019-10-23 09:41:27 +02:00
Martine Lenders
88090bc0f6 gnrc_netif: warn when not joining solicited-nodes from non-6LN netif
Similar as with #12513, when the NIB is compiled in 6LN mode (but not
6LR mode), the address-resolution state-machine (ARSM) functionality is
disabled in favor of the more simpler address resolution proposed in RFC
6775.

However, if a non-6LN interface is also compiled in (without making it
a router or border router) it will never join the solicited-nodes
multicast address of addresses added to it, resulting in address
resolution to that interface to fail.

If the interface is not a 6LN (which in case 6LN mode is disabled is
always false), a warning is now printed, encouraging the user to
activate the ARSM functionality if needed.
2019-10-22 22:14:03 +02:00
8827202ac7
sys/flashwrite: remove useless line
scan-build reported: Value stored to 'flashpage_pos' is never read
2019-10-22 19:48:34 +02:00
4d7af5d170 sys/event: fix typo: imlementation -> implementation 2019-10-22 16:23:08 +02:00
23edf5cc6b
cdcacm: Add the interface assoc descriptor to the length 2019-10-21 20:28:33 +02:00
Martine S. Lenders
2458a612b6 gnrc_netif: reduce code duplication 2019-10-21 16:09:37 +02:00
Martine S. Lenders
e96faca739 gnrc_netif: add code comments on source candidate set selection 2019-10-21 16:09:37 +02:00
f8de22a985 gnrc/netif: _match_to_idx(): don't treat link local differently
Cherry-picked from 811c1ee70e (#12404)
2019-10-21 16:09:37 +02:00
Martine Lenders
1bdfbeaaa0
Merge pull request #12425 from miri64/gnrc_ipv6_nib/enh/mutex
gnrc_ipv6_nib: use recursive mutex instead of mutex for locking
2019-10-21 16:08:07 +02:00
Benjamin Valentin
2ff7c474b7 shell_commands: gnrc_netif: print correct scope for IPv6 addr
Previously `ifconfig` would only know link-local addresses
(printed as 'local') and everything else would be 'global'.

This is wrong for site-local and unique local addresses which were
also denoted as global.

So use the already existing helper functions to determine the correct
type of IPv6 address when printing.
2019-10-21 14:47:34 +02:00
Martine Lenders
05bcdba02e
Merge pull request #10499 from miri64/gnrc_netif/enh/split-6lo-6ln
gnrc_netif: introduce distinction if an interface supports 6Lo or if it performs ND according to RFC 6775
2019-10-21 11:47:30 +02:00
Martine Lenders
8b2f697f8c
Merge pull request #12512 from miri64/gnrc_ipv6/fix/i11980
gnrc_ipv6: fix SEGFAULT when multicasting with multiple interfaces
2019-10-21 09:44:44 +02:00
Cenk Gündoğan
e66283f12a
Merge pull request #12513 from miri64/gnrc_ipv6_fix/fix/auto-config-with-no-slaac-but-6ln
gnrc_ipv6_nib: don't auto-configure IPv6 w/o SLAAC on non-6LN interface
2019-10-21 01:01:46 +02:00
Martine Lenders
7cba2fb63d gnrc_ipv6_nib: don't auto-configure IPv6 w/o SLAAC on non-6LN interface
When the NIB is compiled for 6LN mode (but not a 6LBR), the Stateless
Address Autoconfiguration (SLAAC) functionality is disabled, as it is
typically not required; see `sys/include/net/gnrc/ipv6/nib/conf.h`, ll.
46 and 55. However, if a non-6LN interface is also compiled in (still
without making the node a border router) an auto-configured address will
be assigned in accordance with [RFC 6775] to the interface, just
assuming the interface is a 6LN interface. As it then only performs
duplicate address detection RFC-6775-style then, the address then never
becomes valid, as the duplicate address detection according to [RFC
4862] (part of the SLAAC functionality) is never performed.

As auto-configuring an address without SLAAC doesn't make sense, this
fix makes the interface skip it completely, but provides a warning to
the user, so they know what to do.

[RFC 6775]: https://tools.ietf.org/html/rfc6775#section-5.2
[RFC 4862]: https://tools.ietf.org/html/rfc4862#section-5.4
2019-10-21 00:17:12 +02:00
benpicco
c9e7fffbec
Merge pull request #12511 from benpicco/pthread-malloc_check
sys/pthread: check return value of malloc()
2019-10-20 20:40:28 +02:00
80f9788324
cdc acm: add interface association descriptor 2019-10-20 15:55:23 +02:00
Dylan Laduranty
d9c240a2ff
Merge pull request #12429 from bergzand/pr/usbus/pre_descriptor
usbus: add descriptor prefix support
2019-10-20 15:52:29 +02:00
Martine Lenders
6ad62b01a4 gnrc_netif: distinct is_6lo() and is_6ln()
The functions now are semantic distinct:

- gnrc_netif_is_6lo(): the interface is a 6Lo interface
- gnrc_netif_is_6ln(): the interface is using Neighbor Discovery
  according to RFC 6775
2019-10-20 15:38:14 +02:00
Martine Lenders
363afa62ee gnrc_netif: introduce 6LN flag
This makes it dynamically configurable if an interface actually want's
to use 6Lo ND (according to RFC 6775) or not.
2019-10-20 15:38:13 +02:00
Martine Lenders
fb0e9559a1 gnrc_ipv6: use is_6lo() instead of is_6ln()
We want to check if the interface is an interface requiring the 6Lo
adaptation layer, not if it is a 6LN according to RFC 6775 [[1]].

[1]: https://tools.ietf.org/html/rfc6775#section-2
2019-10-20 15:38:13 +02:00
Martine Lenders
8bcce5615e gnrc_netif: use is_6lo() instead of is_6ln() 2019-10-20 15:38:13 +02:00
Martine Lenders
6d324bbb75 gnrc_netif: introduce is_6lo() as alias to is_6ln()
Preparation step to introduce a semantic difference between an
interface being a 6Lo interface and a 6LN according to RFC 6775 [[1]]
(i.e. performs Neighbor Discovery as defined there).

[1]: https://tools.ietf.org/html/rfc6775#section-2
2019-10-20 15:38:13 +02:00
Martine Lenders
ce14ee1f77 gnrc_ipv6: fix SEGFAULT when multicasting with multiple interfaces
When writing to the IPv6 header the implementation currently doesn't
take the packet with the (potentially) duplicated header, but the
packet with the original one, which leads to the packet sent and then
released in `gnrc_netif_ethernet.c` first and then accessed again in
further iterations of the "writing to the IPv6 header" loop, which
causes access to an invalid pointer, causing a crash.

Fixes #11980
2019-10-20 14:25:40 +02:00
Benjamin Valentin
764a9e9f63 sys/pthread: check return value of malloc()
To prevent a NULL pointer dereference on a memory constrained system,
check if malloc() was actually successful.
2019-10-20 14:17:07 +02:00
Gunar Schorcht
1657606092 sys/arduino: add Arduino.h for compatibility
Arduino libraries often include Arduino.h. For source code compatibility this header file is required. Header guards in file arduino.hpp had to be renamed.
2019-10-19 19:22:40 +02:00