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

6604 Commits

Author SHA1 Message Date
Martine S. Lenders
f33111a9c2 gnrc_sixlowpan_iphc: remove duplicate gnrc_netif_hdr_get_netif()
The interface is already fetched in the beginning of the function and
doesn't change during its run, so getting the interface again at this
point is just redundant.
2019-11-01 18:29:44 +01:00
benpicco
865059fc66
Merge pull request #11230 from maribu/xtimer_msg_deps
sys/xtimer: Remove dependency to core_msg
2019-11-01 15:22:10 +01:00
Martine S. Lenders
806f33fce4 gnrc_sixlowpan_iphc_nhc: determine UDP hdr length from RB
When decoding IPHC in a fragmented datagram, relying on the size of the
allocated space for the decoded packet is wrong when fragments are
forwarded and decoded on an intermediate node (for which the reassembly
buffer's space is used): Using the full datagram size for allocation in
this case would be wasteful, so the allocated space is only marginally
larger than the fragment's compressed form.
This in turn results in the wrong UDP payload size being chosen and
even worse being forwarded to the subsequent nodes.

This change uses the (virtual) reassembly buffer's `datagram_size`
instead of relying on the allocated space for the encoded
datagram/fragment.
2019-11-01 13:18:00 +01:00
benpicco
3a87e2d2e6
Merge pull request #12624 from miri64/sock_async/fix/compile-time-errors
sock_async: fix compile-time errors
2019-10-31 21:26:05 +01:00
Marian Buschsieweke
cd1ce6b98d
sys/xtimer: Remove dependency to core_msg
When module `core_msg` is not used, `xtimer` now no longer provides the features
related to messages. This allows using `xtimer` without `core_msg`.
2019-10-31 19:55:50 +01:00
Sebastian Meiling
ca696f827b
Merge pull request #12193 from leandrolanzieri/pr/gcoap/obs
gcoap: Add 'obs' attribute in example and extend documentation
2019-10-31 18:14:23 +01:00
Martine S. Lenders
de47681d03 sock_async: fix compile-time errors 2019-10-31 16:01:49 +01:00
Juergen Fitschen
e152b3e346 sys/riotboot: Fixed flashwrite_slotsize to return size of slot 1 2019-10-31 12:05:35 +01:00
8b06560c02
sys/net/nanocoap: correctly initialize array 2019-10-30 17:03:06 +01:00
95da51bd7f
sys/net/nanocoap: fix potential use of uinitialized variable 2019-10-30 17:03:06 +01:00
5d1480a4b8
sys/net/nanocoap: fail when start data cannot be parsed 2019-10-30 17:03:06 +01:00
1aa1e2c8cc
sys/net/nanocoap: return ENOENT if parsing option failed
This fixes a potential use of uninitialized len in subsequent function calls.

This was reported by scan-build
2019-10-30 17:03:06 +01:00
Martine Lenders
5b4b12ed07
Merge pull request #11723 from miri64/sock/enh/async2
sock: initial definitions for asynchronous event handling
2019-10-30 16:59:11 +01:00
Martine Lenders
bf5b53392c
Merge pull request #12603 from jia200x/pr/link_up
netopt: redefine NETOPT_LINK_CONNECTED
2019-10-30 15:19:07 +01:00
Martine Lenders
f0b5eb04c1 sock: initial import of asynchronous event definitions 2019-10-30 13:23:31 +01:00
Jose Alamos
f38a786108 sc_gnrc_netif: implement link command 2019-10-30 13:13:06 +01:00
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
Martine Lenders
ea4b78654f
Merge pull request #12285 from JulianHolzwarth/pr/posix/pthread/pthread_reaper_fix
sys/posix/pthread/pthread.c: fix pthread reaper
2019-10-29 18:56:36 +01:00
Martine S. Lenders
dba2f9e5ea gnrc_sixlowpan_frag: remove code duplication on fragment creation 2019-10-29 15:34:24 +01:00
Martine S. Lenders
d5e21f35c3 gnrc_sixlowpan_frag: copy netif header directly 2019-10-29 15:34:24 +01:00
benpicco
acaaee910e
Merge pull request #12536 from bergzand/pr/usbus/cdcacm_activate_on_dte_present
cdcacm: Activate data out endpoint on DTE present signal
2019-10-29 13:03:39 +01:00
Martine Lenders
526c963f43
Merge pull request #12594 from jia200x/pr/deprecate/gnrc_nettest
gnrc_nettest: add deprecation note
2019-10-29 10:59:14 +01:00
Jose Alamos
5b179b6d80 gnrc_nettest: add deprecation note
This module was intended to be a test framework for GNRC but it never
really got used. It was not maintained for 3 years. It will be removed
after 2020.07 release at the latest.
2019-10-29 10:41:45 +01:00
Martine Lenders
05d338169d
Merge pull request #12367 from brummer-simon/gnrc_tcp-fix_recv_conn_closed
gnrc_tcp: return immediatly on gnrc_tcp_recv if a connection is closing
2019-10-29 09:54:43 +01:00
1d7032a257
cdcacm: Activate data out endpoint on DTE present signal 2019-10-29 08:45:31 +01:00
727263ce73
Merge pull request #12533 from bergzand/pr/usbus/cdcecm_ready_on_iface
cdcecm: only activate OUT endpoint after interface selection
2019-10-29 07:55:35 +01:00
benpicco
456982f595
Merge pull request #12595 from aabadie/pr/net/sock_util_scan_build
sys/net/sock_util: fix dead initialization warning
2019-10-28 17:24:50 +01:00
2b0b591c85
sys/net/sock_util: fix dead initialization warning
This was reported by LLVM scan build. The value assigned at initialization is never used, so could be removed
2019-10-28 16:35:18 +01:00
a9399810d5
sys/net/uhcp: remove unused returned value in uhcp_client 2019-10-28 15:14:40 +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
b32ec6b864
usbus: add find_endpoint function for interfaces 2019-10-23 10:10:54 +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
Simon Brummer
1eb2969986 gnrc_tcp_recv: immediatly return on closed connection 2019-10-22 20:12:38 +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
fdcadb67e3
cdcecm: only activate OUT endpoint after interface selection
The OUT endpoint of the cdc ecm data endpoint is only expected to
receive data when the alternative interface is activated. Signalling
ready in the init function can cause issues as the endpoints are not yet
enabled in the low level USB peripheral driver.
2019-10-21 19:47:50 +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
Gunar Schorcht
a12e1033e9 tests/can_conn: move static_assert into function 2019-10-19 17:23:21 +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