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

6477 Commits

Author SHA1 Message Date
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
Martine Lenders
f228dedcf4 gnrc_sixlowpan_frag_rb: fix comment typo 2019-10-19 16:30:45 +02:00
Martine S. Lenders
5bf9892bb3 gnrc_sixlowpan_frag_rb: add new functions for SFR 2019-10-19 16:30:45 +02:00
Martine Lenders
78f04c9fd1
Merge pull request #12441 from miri64/gnrc_icmpv6_error/fix/not-send
gnrc_icmpv6_error: consider originator's destination address correctly
2019-10-19 15:18:50 +02:00
Martine Lenders
c32f1076f6 gnrc_icmpv6_error: consider originator's destination address correctly
While 485dbd1fda (from #12175) was right
in assuming that the for most ICMPv6 error messages the originating
packet's destination address must not be a multicast, this is not the
case for _all_ ICMPv6 error messages (see [RFC 4443], section 2.4(e.3)).
Additionally, 485dbd1fda removed the
check for the source address ([RFC 4443], section 2.4(e.6)), which this
PR re-adds.

[RFC 4443]: https://tools.ietf.org/html/rfc4443#section-2.4
2019-10-19 14:39:45 +02:00
bce70bfdfa
usbus: add descriptor prefix support 2019-10-18 22:39:39 +02:00
José Alamos
2fb4a79d9a
Merge pull request #12418 from Rotzbua/doc_sha3
sys/hashes/sha3: docu rename hashes to FIPS 202 standard
2019-10-18 15:59:26 +02:00
Martine S. Lenders
ae879bc2ba gnrc_sixlowpan_frag_rb: add doc on rb_remove() NOP 2019-10-18 12:02:03 +02:00
Martine S. Lenders
184e91780a gnrc_sixlowpan_frag_rb: explain second _rbuf_add() call more detailed 2019-10-18 11:14:13 +02:00
Martine S. Lenders
f8d75d7add gnrc_sixlowpan_frag_rb: behavioral change to add()
Rather than dispatching the packet automatically once it is complete,
`gnrc_sixlowpan_frag_rb_add()` now only returns success, and leaves it
to the caller to dispatch the packet.
2019-10-18 09:02:32 +02:00
Martine S. Lenders
709baf8f1f gnrc_sixlowpan_frag_rb: make NOPs static inline functions 2019-10-18 09:02:32 +02:00
Martine S. Lenders
a229755abe gnrc_sixlowpan_frag_rb: return status on dispatch_when_complete() 2019-10-18 09:02:32 +02:00
Martine S. Lenders
b086453347 gnrc_sixlowpan_frag_rb: return pointer to entry on add() 2019-10-18 09:02:32 +02:00
Martine S. Lenders
3a4ebe98c3 gnrc_sixlowpan_frag_rb: get index instead of pointer with _rbuf_get() 2019-10-18 09:02:31 +02:00
Jannes
2df5d6048d driver/mpu9x50: Rename mpu9150 to mpu9x50
Rename all files

Rename all variables, methods and methodcalls

Rename all folders

Add to the makefiles

Add to doc
2019-10-17 12:52:18 +02:00
MichelRottleuthner
851853b2f7
Merge pull request #12463 from JulianHolzwarth/pr/thread/thread_getstatus
core/thread.c: change thread_getstatus return type
2019-10-16 14:28:28 +02:00
Ken Bannister
fe8bb49e39
Merge pull request #12231 from kb2ma/coap/refine_api_purpose
net/nanocoap: rebalance application vs. option API doc
2019-10-15 18:25:50 -04:00
JulianHolzwarth
1d65b36402 sys/cpp11-compat/thread.cpp: remove cast to int 2019-10-15 21:22:42 +02:00
benpicco
97d5040525
Merge pull request #12272 from miri64/shell/enh/run-forever
shell: make shell_run run shell forever
2019-10-15 20:16:04 +02:00
Cenk Gündoğan
eb981fe8dd
Merge pull request #12444 from miri64/gnrc_sixlowpan_frag_rb/enh/factor-frag-out
gnrc_sixlowpan_frag_rb: seperate out classic frag specific code
2019-10-15 17:41:29 +02:00
Martine Lenders
2a74d32ea9 gnrc_sixlowpan_frag_rb: seperate out classic frag specific code 2019-10-15 10:40:50 +02:00
Martine Lenders
a7d082d9b8 sixlowpan: more helper functions 2019-10-15 10:40:50 +02:00
Martine Lenders
b5b52c74e8 gnrc_ipv6: only discard invalid source when assigned to interface
While it is correct to not use an invalid address as a source address,
it is incorrect to assume that addresses not assigned to the interface
(`idx == -1` in the respective piece of code) are invalid: Other than
classic forwarding via a FIB, forwarded packets utilizing a IPv6
routing header will pass this check, like any other packet sent by this
node. The source address for these is not on the given node, so e.g.
source routing is not possible at the moment.
2019-10-14 15:43:07 +02:00
Martine Lenders
a279228663 gnrc_rpl_srh: don't send error message on multicast error
A node is not supposed to send an ICMPv6 error message when the
destination or one of the addresses in the source route is multicast
but is supposed to be silently discarded (see [RFC4443] and [RFC6554]).
If we leave the `err_ptr` unset, the [node will not send an error
message][err_ptr set].

[RFC 4443]: https://tools.ietf.org/html/rfc4443#section-2.4
[RFC 6554]: https://tools.ietf.org/html/rfc6554#section-4.2
[err_ptr set]: https://github.com/RIOT-OS/RIOT/blob/9bc600a/sys/net/gnrc/network_layer/ipv6/ext/rh/gnrc_ipv6_ext_rh.c#L100-L105
2019-10-14 11:25:53 +02:00
Martine Lenders
c94de51e03
Merge pull request #12414 from miri64/gnrc_ipv6_ext_frag/fix/n-th-with-full-rbuf
gnrc_ipv6_ext_frag: fix release on rbuf creation for n-th fragment
2019-10-13 15:10:50 +02:00
benpicco
48f9ed48c9
Merge pull request #12421 from Rotzbua/doc_sha256
sys/hashes/sha256: fix typo in docu
2019-10-11 13:36:13 +02:00
Jose Alamos
8fd0c2b60f gnrc_netif: adapt to new netif_t abstraction 2019-10-11 10:59:14 +02:00
Jose Alamos
77a7aed6e6 netif: introduce descriptor based netif 2019-10-11 10:59:14 +02:00
Rotzbua
e296f69743 sys/hashes/sha256: fix typo in docu 2019-10-11 00:02:36 +02:00
Rotzbua
5172e6bf2e sys/hashes/sha3: docu rename hashes to FIPS 202 standard 2019-10-10 23:58:55 +02:00
Martine S. Lenders
095e966b73 gnrc_ipv6_ext_frag: fix release on rbuf creation for n-th fragment
The IPv6 (extension) headers of the first fragment received are re-used
for the reassembled packet, so when receiving a subsequent packet we
need to distinguish, if we just want to release the payload or all of
the packet after the packet data was added to the reassembly buffer.
2019-10-10 16:41:51 +02:00
5ab8d92702
Merge pull request #11818 from kaspar030/suit-pr
sys/suit: initial support for SUIT firmware updates
2019-10-10 10:38:01 +02:00
Martine S. Lenders
ada7c0b7db gnrc_netif: avoid deprecated addresses, don't prefer them! 2019-10-09 15:18:14 +02:00
b899a9f362 examples/suit_update: add SUIT draft v4 example & test
This commit adds an example application showcasing SUIT draft v4
firmware updates.

It includes a test script suitable for local or CI testing.

Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
Co-authored-by: Koen Zandberg <koen@bergzand.net>
Co-authored-by: Francisco Molina <femolina@uc.cl>
2019-10-09 13:51:29 +02:00
fb12c4aa8d sys/suit: add SUIT draft v4 firmware upgrade module
This commit adds a sys module implementing SUIT draft v4 compatible
firmware updates.

Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
Co-authored-by: Koen Zandberg <koen@bergzand.net>
Co-authored-by: Francisco Molina <femolina@uc.cl>
2019-10-09 11:05:01 +02:00
Hauke Petersen
eced473fb0
Merge pull request #12385 from miri64/gnrc_sixlowpan_frag_vrb/enh/route-to-vrb
gnrc_sixlowpan_frag_vrb: add gnrc_sixlowpan_frag_vrb_from_route()
2019-10-09 11:00:33 +02:00