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

4965 Commits

Author SHA1 Message Date
Benjamin Valentin
a6ef93fc71 nanocoap: make use of COAP_PAYLOAD_MARKER 2024-01-23 19:16:59 +01:00
Benjamin Valentin
616a5d69f6 gnrc/ipv6: only send link-local loopback if it's on the same interface 2024-01-22 20:03:41 +01:00
Benjamin Valentin
1c24462cd9 nanocoap: implement coap_find_uri_query() 2024-01-19 10:53:03 +01:00
Benjamin Valentin
c650b38989 gcoap: move gcoap_fileserver to nanoCoAP 2024-01-17 19:21:47 +01:00
benpicco
c1ae2ecb9f
Merge pull request #20259 from fabian18/pr/gnrc/ipv6/nib_rejoin_ip6_mcast
gnrc/ipv6/nib: rejoin ipv6_addr_all_nodes_link_local on interface up
2024-01-16 15:11:53 +00:00
Fabian Hüßler
ab3f77e673 gnrc/ipv6/nib: rejoin ipv6_addr_all_nodes_link_local on interface up 2024-01-16 12:34:37 +01:00
Frederik Haxel
291c89f1e7 sys/net/gnrc: Fixed wrong PRIuSIZE format specifier 2024-01-12 17:17:33 +01:00
Benjamin Valentin
eb76b8ea62 nanocoap: allow lastonum=NULL in coap_opt_put_uri_pathquery() 2024-01-11 16:51:18 +01:00
Benjamin Valentin
a470c1cb44 nanocoap_sock: always use coap_opt_put_uri_pathquery() 2024-01-11 16:51:18 +01:00
benpicco
bb4c4ddf20
Merge pull request #20243 from benpicco/gnrc_ipv6_nib_pl_set-relax
gnrc/nib: allow prefix to be on-link without being used for address
2024-01-10 22:19:03 +00:00
Benjamin Valentin
433438c924 gnrc/nib: allow prefix to be on-link without being used for address 2024-01-10 14:49:03 +01:00
Benjamin Valentin
7240f707a5 nanocoap_sock: implement FETCH methods 2024-01-09 12:40:10 +01:00
benpicco
1d3a7cdb5a
Merge pull request #20224 from benpicco/GNRC_IPV6_STATIC_LLADDR_FIXED
gnrc/ipv6/nib: allow for predictable static link-local addresses
2024-01-04 18:17:09 +00:00
Benjamin Valentin
4a5757b9af gnrc/ipv6/nib: add Kconfig for static link-local address 2024-01-04 17:45:23 +01:00
Benjamin Valentin
7196b0a2ae gnrc/ipv6/nib: allow for predictable static link-local addresses 2024-01-04 16:13:37 +01:00
Benjamin Valentin
ecb1e57b18 net/eui_provider: include board.h 2024-01-04 13:16:24 +01:00
Frederik Haxel
9272ad8d9a net/gnrc/rpl: Remove unused debug string 2023-12-21 12:06:47 +01:00
Frederik Haxel
64ba553d1f sys: Use size_t print format specifier
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@posteo.net>
2023-12-21 12:02:19 +01:00
Oleg Hahm
724e6e0098
Merge pull request #20167 from benpicco/gnrc_ipv6_classic
gnrc_ipv6_nib: fix config for mixed 6lo/classic setup
2023-12-20 12:12:40 +00:00
Benjamin Valentin
9ceb7cd30c gnrc/ipv6/nib: fix GNRC_IPV6_STATIC_LLADDR when link state changes 2023-12-19 18:33:59 +01:00
Benjamin Valentin
2f9c68dabc sys/net/netif: constify netif access 2023-12-15 16:50:21 +01:00
Benjamin Valentin
8f7dad6c53 gnrc: introduce gnrc_ipv6_classic pseudo-module 2023-12-11 23:31:21 +01:00
benpicco
81b5cf2e94
Merge pull request #20139 from benpicco/gnrc_sixloenc-fix
net/gnrc/netif: set 6LN flag for ethernet if gnrc_sixloenc is used
2023-12-07 20:06:13 +00:00
Marian Buschsieweke
d160a78ecc
sys/net/gnrc_sock: assume timeout is feasible
When not implementing the timeout feature, add an `assume()` that there
is no timeout. Otherwise things break at runtime and are hard to debug.
2023-12-06 13:48:27 +01:00
Benjamin Valentin
bc2c95c833 net/gnrc/netif: set 6LN flag for ethernet if gnrc_sixloenc is used 2023-12-04 22:56:28 +01:00
Marian Buschsieweke
d252eb7395
Merge pull request #19998 from fabian18/gnrc_static_messge_queues
gnrc: make message queues static
2023-12-04 11:21:08 +00:00
benpicco
6eed92b1b7
Merge pull request #20114 from benpicco/gnrc_netif-error
sys/net/gnrc/netif: print which netif failed to init
2023-11-29 00:14:45 +00:00
Benjamin Valentin
c5b6a49b21 sys/net/gnrc/netif: print which netif failed to init 2023-11-28 23:01:21 +01:00
benpicco
db6d918c46
Merge pull request #19965 from benpicco/sock_udp_recv-ealry
sock/udp: work around gnrc_sock_recv() returning early timeout
2023-11-28 12:31:39 +00:00
Benjamin Valentin
e2e5e03439 nanocoap_sock: use coap_get_code_raw() 2023-11-28 13:11:11 +01:00
Benjamin Valentin
e3d00682bc sock/udp: work around gnrc_sock_recv() returning early timeout
sock_udp_recv_buf_aux() sometimes will return -ETIMEDOUT before
the given timeout has expired (e.g. 28798µs instead of 160000µs).

This messes with many assumptions and breaks protocols that rely
on the timeout.

Until we have a proper fix, add this workaround.
2023-11-14 13:33:16 +01:00
benpicco
81fd126d3e
Merge pull request #20076 from bergzand/pr/gcoap_msec
gcoap: Use millisecond timer for observe option values
2023-11-14 10:26:18 +00:00
a6a8f6e1cd
gcoap: Separate out observe option generation in own function 2023-11-10 16:01:57 +01:00
6425fda812
gcoap: Use millisecond timer for observe option values 2023-11-10 16:00:00 +01:00
Benjamin Valentin
75f10a5725 gnrc/ipv6/nib: don't do multicast neighbor solicitation on 6LoWPAN 2023-11-10 12:11:49 +01:00
Benjamin Valentin
a8fc0a25ed gcoap_fileserver: use coap_get_code_raw() 2023-10-27 19:18:37 +02:00
Benjamin Valentin
a5cc48ad45 nanocoap_sock: use coap_get_code_raw() 2023-10-27 19:18:37 +02:00
Benjamin Valentin
54362e2c2a nanocoap/cache: use coap_get_code_raw() 2023-10-27 19:18:00 +02:00
bors[bot]
647a13c392
Merge #19999
19999: nib/_nib-6ln: bail out early if address is no longer assigned r=miri64 a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-10-24 16:01:53 +00:00
Benjamin Valentin
8779b5edde nib/_nib-6ln: don't check twice if address is assigned 2023-10-24 16:47:47 +02:00
Benjamin Valentin
7c6b367035 nib/_nib-6ln: bail out early if address is no longer assigned 2023-10-24 16:44:25 +02:00
bors[bot]
61ae692ae9
Merge #19994
19994: nanocoap: prevent integer underflow in coap_opt_put_uri_pathquery() r=miri64 a=benpicco





Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-10-24 09:20:51 +00:00
Benjamin Valentin
0fa04a3d57 nanocoap: prevent integer underflow in coap_opt_put_uri_pathquery()
If uri contains no path but only a query "?foo=bar" `len` would underflow.
Fix this by detecting if there is no path.

Reported by @Yu3H0
2023-10-20 12:59:42 +02:00
Fabian Hüßler
5aa3baac8c gnrc/udp: make message queue static 2023-10-19 17:52:30 +02:00
Fabian Hüßler
c741fa5fbe gnrc/pktdump: make message queue static 2023-10-19 17:49:25 +02:00
Fabian Hüßler
662f1be5d5 gnrc/sixlowpan: make message queue static 2023-10-19 17:47:24 +02:00
Fabian Hüßler
975f8959ce gnrc/ipv6: make message queue static 2023-10-19 17:45:08 +02:00
bors[bot]
b6772c85fd
Merge #19968
19968: gcoap: fix underflow when correcting ETag from cache r=miri64 a=miri64



Co-authored-by: Martine Lenders <m.lenders@fu-berlin.de>
2023-10-17 14:20:41 +00:00
bors[bot]
910e0e28ed
Merge #19963 #19971 #19974 #19975 #19976
19963: sys/event/timeout: add event_timeout_is_pending() r=benpicco a=benpicco



19971: sys/shell/gnrc_netif: Fix a few blockers for sharing ifconfig shell r=benpicco a=yarrick



19974: gnrc_ipv6_ext_frag: _completed: Add comment why list head is not checked for NULL pointer dereference r=benpicco a=miri64

 


19975: pkg/nanocbor: Bump to latest commit r=benpicco a=bergzand

### Contribution description

Not much to see here

Important changes:
- Add stream-like interface for encoder
- Separate functions for number of items left in arrays and maps

### Testing procedure

The usual test should still work

### Issues/PRs references

None

19976: core: Express -1 as ~0 in thread_status_t cast r=benpicco a=SimonIT



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Erik Ekman <eekman@google.com>
Co-authored-by: Martine Lenders <m.lenders@fu-berlin.de>
Co-authored-by: Koen Zandberg <koen@bergzand.net>
Co-authored-by: SimonIT <simonit.orig@gmail.com>
2023-10-16 15:31:25 +00:00
Marian Buschsieweke
edc43201db
tree-wide: fix typos in doc and comments
This should not change any generated binary
2023-10-16 12:17:48 +02:00
Martine Lenders
988db6923d
gnrc_ipv6_ext_frag: _completed: Add comment why list head is not checked
... for NULL pointer dereference.
2023-10-12 16:24:18 +02:00
Erik Ekman
4f6b2759be sys/net: Add NETOPT_ACTIVE for netif on/off state
Similar to forcing interface up/down on Linux.
In lwIP this is separate to link state.
2023-10-11 21:46:55 +02:00
Martine Lenders
8d1cb1bd2b
gcoap: fix underflow when correcting ETag from cache 2023-10-10 14:41:45 +02:00
krzysztof-cabaj
d7000477d4 gnrc/icmpv6: add check for too big icmpv6 packets 2023-09-20 11:24:56 -04:00
Benjamin Valentin
c337992236 net/gnrc/rpl: enable RTR_ADV on RPL interface 2023-09-12 10:32:16 +02:00
bors[bot]
8e5a67b088
Merge #19870 #19900 #19902
19870: tests/gcoap_fileserver: only enable test with GCC r=benpicco a=benpicco





19900: gnrc_ipv6_nib: fix for border router with non-6lo interfaces r=benpicco a=benpicco





19902: tests/pkg/relic: skip CI testing with samr21-xpro and llvm toolchain r=benpicco a=aabadie



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
2023-08-24 14:28:41 +00:00
Benjamin Valentin
d38379688d gnrc_ipv6_nib: fix for border router with non-6lo interfaces
A border router should not send router advertisements on it's 6LoWPAN
interfaces, but if it also has classic IPv6 downstream interfaces it
should very much do so.
2023-08-24 12:05:03 +02:00
bors[bot]
d1edbd94d6
Merge #19881 #19892
19881: drivers/stmpe811: fix initialization if callback function parameter is NULL r=benpicco a=gschorcht

### Contribution description

This PR fixes the `stmpe811` driver initialization if the callback function parameter `cb` is `NULL. This might be the case for example if the application uses the touch device in polling mode.

If the interrupt pin is initialized if the callback function parameter `cb` is `NULL`, the driver crashes the first time an interrupt is triggered. Therefore, the INT pin must be initialized only if also the callback function parameter `cb` is not `NULL`.

To be able to test the polling mode, this PR also includes a change of the `tests/drivers/stmpe811` application which introduces the environment variables `STMPE811_POLLING_MODE` `STMPE811_POLLING_PERIOD` and in the makefile.

### Testing procedure

1. Use a `stm32f429i-disc1` board and test it in polling mode:
   ```
   STMPE811_POLLING_MODE=1 BOARD=stm32f429i-disc1 make -C tests/drivers/stmpe811 flash term
   ```
   It should work as expected.
   ```
   main(): This is RIOT! (Version: 2023.10-devel-119-g26e7a-drivers/stmpe811_fix_cb_null)
   STMPE811 test application
   +------------Initializing------------+
   Initialization successful
   Pressed!
   X: 113, Y:135
   X: 113, Y:135
   X: 113, Y:136
   Released!
   ```

2. Checkout master branch and cerry-pick commit 691a5e6308426ddc685e5a2c297238529211c258. The test application `tests/drivers/stmpe811` will crash once a touch event occur:
   ```
   main(): This is RIOT! (Version: 2023.10-devel-117-g91441)
   STMPE811 test application
   +------------Initializing------------+
   Initialization successful
   Stack pointer corrupted, reset to top of stack
   FSR/FAR:
    CFSR: 0x00020000
    HFSR: 0x40000000
    DFSR: 0x00000008
    AFSR: 0x00000000
   Misc
   EXC_RET: 0xfffffff1
   *** RIOT kernel panic:
   HARD FAULT HANDLER
   ```

### Issues/PRs references

19892: pkg/tinydtls: allow to set buffer size from application again r=benpicco a=leandrolanzieri

### Contribution description

Currently the buffer size on tinydtls is set in its Makefile whenever `gcoap` module is present. This limits the ability of the user to override the value. This adds a pre-check of the `CFLAGS` to see if it was set before.

### Testing procedure

Try setting `CFLAGS += -DDTLS_MAX_BUF=<some_value>` on `examples/gcoap_dtls`, you should be able to override the default value without errors.


### Issues/PRs references
Reported in #19838


Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Leandro Lanzieri <leandro.lanzieri@haw-hamburg.de>
2023-08-23 22:43:56 +00:00
Leandro Lanzieri
e65f1c41fe
sys/net/gcoap: configure DTLS buffer 2023-08-21 17:21:12 +02:00
Leandro Lanzieri
91001468f9
sys/net/nanocoap: configure DTLS buffer 2023-08-21 17:21:12 +02:00
bors[bot]
e56353cf24
Merge #19387 #19874 #19875
19387: drivers/atwinc15x0: support dynamic scanning and connection to AP r=benpicco a=fabian18



19874: coap: add missing option numbers r=benpicco a=JKRhb



19875: coap: add missing Content-Format definitions r=benpicco a=JKRhb



Co-authored-by: Fabian Hüßler <fabian.huessler@ml-pa.loc@MLPA-NB119.(none)>
Co-authored-by: Fabian Hüßler <fabian.huessler@ml-pa.com>
Co-authored-by: Jan Romann <jan.romann@hs-emden-leer.de>
2023-08-21 13:49:27 +00:00
Fabian Hüßler
63ac792b8b net: add NETOPT_{SCAN, CONNECT, DISCONNECT} 2023-08-19 23:23:10 +02:00
Fabian Hüßler
b65002ecdc tests/net: add test for l2scan list module 2023-08-18 20:42:43 +02:00
Benjamin Valentin
ae28f11e3a gnrc_static: fix static PID assignment 2023-08-01 23:27:20 +02:00
Benjamin Valentin
5a0550e96e sys/net/sock: add sock_aux_ttl 2023-07-18 16:41:42 +02:00
Marian Buschsieweke
4709bbb952
sys/net/gnrc_lorawan: make clang happy
`clang` doesn't propagate the packed attribute to members. I think
this incorrect, but explicitly adding it won't hurt and makes clang
happy. So let's have it.
2023-07-18 12:24:08 +02:00
Fabian Hüßler
dd52f5fedd sys/net: add l2scan list module 2023-07-14 20:27:10 +02:00
bors[bot]
72ca81b65c
Merge #19487 #19808
19487: nanocoap: implement extended tokens (RFC 8974) r=benpicco a=benpicco



19808: boards: add ESP32-S3-USB-OTG support r=benpicco a=gschorcht

### Contribution description

This PR provides the support for the [ESP32-S3-USB-OTG](https://docs.espressif.com/projects/espressif-esp-dev-kits/en/latest/esp32s3/esp32-s3-usb-otg/user_guide.html) board.

The SD card can only be used in SPI mode at the moment. As soon as PR #19786 is merged, the SD/MMC support can be enabled and the SD card can then be used in SD mode with 4-bit data bus width.

The display uses uses the ST7789 driver IC that is compatible with the ST7735. For that purpose the ST7735 driver is extended by a pseudomodule definition `st7789` for the ST7789 which is enabled by the board and enables automatically the `st7789` (e57c48a33ee2a869c15603788e5306ba066f91cf). Vise versa, board's `Makefile.dep` enables automatically the `st7789` pseudomodule if the `st7735` is used. The pseudomodule `st7789` is just used to increase the upper limit for supported lines. This change is also part of PR #19807.

~The PR includes a very small documentation fix for ESP32-S3-DevKit board that was noticed during the development of this board definition (1155b6ac1b8efa39d8a0bd7150e602095159fdc1).~

### Testing procedure

The board has been tested with all basic tests for supported hardware including `tests/driver/st3375`:

![IMG_20230707_105556](https://github.com/RIOT-OS/RIOT/assets/31932013/88d4ac11-0c02-4339-a423-7900e1c0904c)

- [x] tests/drivers/st3375
- [x] tests/periph/gpio
- [x] tests/periph/pwm
- [x] tests/periph/spi
- [x] tests/periph/uart
- [x] tests/sys/usbus_cdc_ecm 

### Issues/PRs references


Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de>
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-07-07 17:41:40 +00:00
bors[bot]
ddf1fe252d
Merge #19733 #19747 #19769 #19782
19733: cpu/msp430: reorganize code r=maribu a=maribu

### Contribution description

RIOT supports two distinct families of the MSP430: The [MSP430 x1xx] MCU family and the [MSP430 F2xx/G2xx] MCU family. For both incompatible MCU families the code was located in the msp430fxyz folder, resulting in case of the UART driver in particularly bizarre code looking roughly like this:

```C
#ifndef UART_USE_USCI
/* implementation of x1xx peripheral ... */
#else
/* implementation of F2xx/G2xx peripheral ... */
#endif
/* zero shared code between both variants */
```

This moves peripheral drivers shared between the two families to msp430_common and splits the SPI and UART driver into two MCU families.

In addition, it cleans up the `msp430_regs.h` by dropping most of it and using the macros and symbols provided by the vendor header files. There is little reason for us to maintain constants when TI is already doing that.

[MSP430 x1xx]: https://www.ti.com/lit/ug/slau049f/slau049f.pdf
[MSP430 F2xx/G2xx]: https://www.ti.com/lit/ug/slau144k/slau144k.pdf


19747: gnrc/ipv6/nib: reset rs_sent counter also for not-6LN interfaces r=maribu a=fabian18



19769: cpu/nrf53: add initial support with nRF5340DK-APP board r=maribu a=dylad

### Contribution description

This PR adds support for nRF5340 MCU and its associated Nordic development board, nRF5340DK.
This MCU provides a dual Cortex-M33, one application core running at up to 128MHz, and one network core running at up to 64MHz.
Peripherals are inherited from others Nordic MCUs families so it shouldn't be hard to add more of them in followup PRs.

For now, only the minimal set of peripherals is supported:
- GPIO / GPIO_IRQ
- UART
- TIMER

### Testing procedure
Build the usual test application for the supported peripherals and flash the board.
nRF5340DK provides two serial ports on its embedded debugger. RIOT's shell should be available on the first one (/dev/ttyACM0)


### Issues/PRs references
#18576
#19267 


19782: cpu/msp430: fix for ti's msp430-gcc-opensource package ld version r=maribu a=hugueslarrive

### Contribution description
My msp430 toolchain (https://www.ti.com/tool/MSP430-GCC-OPENSOURCE) was broken by #19484:
```
hugues@p700:~/github/cpu_msp430_common/RIOT$ BOARD=msb-430 make -j64 -C examples/hello-world
make : on entre dans le répertoire « /home/hugues/github/cpu_msp430_common/RIOT/examples/hello-world »
Building application "hello-world" for "msb-430" with MCU "msp430fxyz".

"make" -C /home/hugues/github/cpu_msp430_common/RIOT/boards/common/init
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/boards/msb-430
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/core
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/core/lib
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430fxyz
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/drivers
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/boards/common/msb-430
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/drivers/periph_common
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/auto_init
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/div
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/libc
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/malloc_thread_safe
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430_common
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/newlib_syscalls_default
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430fxyz/periph
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/preprocessor
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/stdio_uart
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430_common/periph
/opt/ti/msp430-gcc/bin/../lib/gcc/msp430-elf/9.3.1/../../../../msp430-elf/bin/ld: .rodata not found for insert
collect2: error: ld returned 1 exit status
make: *** [/home/hugues/github/cpu_msp430_common/RIOT/examples/hello-world/../../Makefile.include:761 : /home/hugues/github/cpu_msp430_common/RIOT/examples/hello-world/bin/msb-430/hello-world.elf] Erreur 1
make : on quitte le répertoire « /home/hugues/github/cpu_msp430_common/RIOT/examples/hello-world »
hugues@p700:~/github/cpu_msp430_common/RIOT$ /opt/ti/msp430-gcc/msp430-elf/bin/ld --version
GNU ld (Mitto Systems Limited - msp430-gcc 9.3.1.11) 2.34
Copyright (C) 2020 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
hugues@p700:~/github/cpu_msp430_common/RIOT$ /opt/ti/msp430-gcc/msp430-elf/bin/ld --version | grep -Eo '[0-9]\.[0-9]+'
9.3
1.11
2.34
hugues@p700:~/github/cpu_msp430_common/RIOT$ /opt/ti/msp430-gcc/msp430-elf/bin/ld --version | grep -Eo '[0-9]\.[0-9]+$'
2.34
```


### Testing procedure
```
hugues@p700:~/github/cpu_msp430_common/RIOT$ BOARD=msb-430 make -j64 -C examples/hello-world
make : on entre dans le répertoire « /home/hugues/github/cpu_msp430_common/RIOT/examples/hello-world »
Building application "hello-world" for "msb-430" with MCU "msp430fxyz".

"make" -C /home/hugues/github/cpu_msp430_common/RIOT/boards/common/init
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/boards/msb-430
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/core
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/core/lib
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430fxyz
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/drivers
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/boards/common/msb-430
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/drivers/periph_common
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/auto_init
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/div
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/libc
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/malloc_thread_safe
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/newlib_syscalls_default
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/preprocessor
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430_common
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/sys/stdio_uart
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430fxyz/periph
"make" -C /home/hugues/github/cpu_msp430_common/RIOT/cpu/msp430_common/periph
   text	   data	    bss	    dec	    hex	filename
   8612	    722	    866	  10200	   27d8	/home/hugues/github/cpu_msp430_common/RIOT/examples/hello-world/bin/msb-430/hello-world.elf
make : on quitte le répertoire « /home/hugues/github/cpu_msp430_common/RIOT/examples/hello-world »
```


### Issues/PRs references
Introduced by #19484, highlighted in #16727.


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@posteo.net>
Co-authored-by: Fabian Hüßler <fabian.huessler@ml-pa.com>
Co-authored-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
Co-authored-by: Hugues Larrive <hlarrive@pm.me>
2023-07-04 18:43:26 +00:00
bors[bot]
655211129e
Merge #19749
19749: sys/net/rpl: fix missing assignment operator r=maribu a=szsam




Co-authored-by: Mingjie Shen <shen497@purdue.edu>
2023-06-24 16:04:59 +00:00
bors[bot]
9ba1d78c55
Merge #19756
19756: all/gnrc: fix null pointer dereference r=miri64 a=szsam



Co-authored-by: Mingjie Shen <shen497@purdue.edu>
2023-06-23 05:13:31 +00:00
Mingjie Shen
51ff6c3675 all/gnrc: fix null pointer dereference
Check return values of following functions for null:
    - gnrc_netif_iter
    - gnrc_netif_hdr_build
    - gnrc_pktsnip_search_type
    - gnrc_netif_get_by_pid
    - gnrc_netif_hdr_get_netif
    - _nib_drl_get
2023-06-22 19:43:30 -04:00
Mingjie Shen
4fc1c25082 sys/net/rpl: fix missing assignment operator
GNRC_RPL_COUNTER_INCREMENT has no external side effects.
2023-06-21 14:05:07 -04:00
Fabian Hüßler
7ea264e310 gnrc/ipv6/nib: reset rs_sent counter also for not-6LN interfaces 2023-06-20 14:28:44 +02:00
Mingjie Shen
fe92f676b4 gnrc/rpl: fix incorrect addition overflow check
Checking for overflow of integer addition by comparing against one of
the arguments of the addition does not work when the result of the
addition is automatically promoted to a larger type.

Fix by using an explicit cast to make sure that the result of the
addition is not implicitly converted to a larger type.
2023-06-17 02:25:11 -04:00
bors[bot]
c463bc9c11
Merge #18156
18156: pkg/opendsme: add initial support for IEEE 802.15.4 DSME time-slotted MAC r=jia200x a=jia200x



Co-authored-by: Jose Alamos <jose@alamos.cc>
2023-06-13 12:11:07 +00:00
bors[bot]
98370beb4f
Merge #19721
19721: nanocoap, gcoap: homogenize name of the module r=benpicco a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-06-08 19:03:32 +00:00
bors[bot]
2268caa811
Merge #19212 #19360 #19401 #19645 #19720
19212: shell/rtc: use rtc_tm_normalize() to sanitize input r=benpicco a=benpicco



19360: gcoap: make use coap_build_reply() in gcoap_resp_init() r=benpicco a=benpicco



19401: shell/cmds: add genfile command r=benpicco a=benpicco



19645: sys/isrpipe: Replace xtimer with ztimer_usec r=benpicco a=MrKevinWeiss



### Contribution description

Getting ready for the xtimer dep.


### Testing procedure

Green murdock, there is no explicit test for isrpipe but since it runs xtimer compat it should operate the same.

### Issues/PRs references



19720: tests: remove unnecessary use of floating point r=benpicco a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: MrKevinWeiss <weiss.kevin604@gmail.com>
Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de>
2023-06-08 16:02:09 +00:00
Benjamin Valentin
d4042eedde gcoap: homogenize name of the module 2023-06-08 16:33:05 +02:00
Benjamin Valentin
661829f43f nanocoap: homogenize name of the module 2023-06-08 16:29:12 +02:00
Benjamin Valentin
aba5e9bcde gcoap: make use coap_build_reply() in gcoap_resp_init() 2023-06-08 15:29:03 +02:00
Benjamin Valentin
923c9a32ef nanocoap: clean up coap_iterate_option(), make it public 2023-06-07 16:07:17 +02:00
Benjamin Valentin
660c77e2c3 nanocoap: implement extended tokens (RFC 8974) 2023-06-05 18:35:29 +02:00
Jose Alamos
70838d379c
auto_init_nrf802154: add opendsme support 2023-05-31 16:31:25 +02:00
Jose Alamos
d7b51c687b
opendsme: add initial support 2023-05-31 16:31:24 +02:00
Jose Alamos
efc0d3d3d9
ieee802154: add DSME configs 2023-05-31 16:31:20 +02:00
bors[bot]
67c011f5a4
Merge #19686 #19687
19686: sys/string_utils: add memchk() r=maribu a=benpicco



19687: tests/unittests: remove old workaround for SAML1X and gcc9.X bug r=maribu a=dylad

### Contribution description
This reverts #13462, this workaround is no longer needed with newer GCC version.

### Testing procedure

Try to compile tests/unittests for `saml11-xpro` or `saml10-xpro`

### Issues/PRs references

This is a revert of #13462.


Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
2023-05-30 23:26:16 +00:00
Benjamin Valentin
4476b2a024 sys/net/gnrc_pktbuf: make use of memchk() 2023-05-30 20:45:13 +02:00
bors[bot]
00b5bc12a2
Merge #19610 #19670 #19678 #19679 #19680 #19681
19610: drivers/periph/rtc: improve doc on rtc_set_alarm r=maribu a=maribu

### Contribution description

- point out behavior on denormalized time stamps
- use errno codes to indicate errors (and adapt the few instances of actual error handling to use them)


19670: cpu/stm32: stm32f4 BRR from BSRR r=maribu a=kfessel

### Contribution description

sometimes one wants to save one instruction :) 
just write the bits we need to write.

### Testing procedure

tests/periph/gpio_ll tests this 

### Issues/PRs references

`@maribu` might know some reference

maybe #19407

19678: gnrc_sixlowpan_iphc: fix NULL pointer dereference r=maribu a=miri64



19679: gnrc_sixlowpan_frag_sfr: fix ARQ scheduler race-condition r=maribu a=miri64



19680: gnrc_sixlowpan_frag_rb: fix OOB write in _rbuf_add r=maribu a=miri64



19681: sys/xtimer: improve documentation r=maribu a=maribu

### Contribution description

- Add a warning that xtimer is deprecated, so that new code hopefully starts using ztimer
- Add a hint that `ztimer_xtimer_compat` can be used even after `xtimer` is gone


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
Co-authored-by: Karl Fessel <karl.fessel@ovgu.de>
Co-authored-by: Martine Lenders <m.lenders@fu-berlin.de>
2023-05-30 17:11:06 +00:00
Martine Lenders
1aeb90ee55
gnrc_sixlowpan_frag_rb: fix OOB write in _rbuf_add 2023-05-30 16:44:09 +02:00
Martine Lenders
31c6191f61
gnrc_sixlowpan_frag_sfr: fix ARQ scheduler race-condition 2023-05-30 16:42:35 +02:00
Martine Lenders
c9d7863e56
gnrc_sixlowpan_iphc: fix NULL pointer dereference 2023-05-30 14:27:13 +02:00
bors[bot]
a272abb15d
Merge #19618 #19639 #19644 #19649 #19656
19618: cpu/stm32: fix riotboot settings for L4 and WB r=benpicco a=gschorcht

### Contribution description

This PR fixes the `riotboot` configuration for L4 and WB.

The family is not called `stm32l4` or `stm32wb` but `l4` and `wb`. That is, the `riotboot` configuration didn't work at all. Furthermore, a minimum `RIOTBOOT_LEN` of `0x2000` is required for L4.

Found when investigating the compilation errors for `bootloaders/riotboot_serial` in PR #19576.

### Testing procedure

1. Green CI.
2. Use the following commands:
    ```
    BOARD=nucleo-l496zg make -C tests/riotboot info-debug-variable-RIOTBOOT_HDR_LEN
    BOARD=p-nucleo-wb55 make -C tests/riotboot info-debug-variable-RIOTBOOT_HDR_LEN
    ```
    In master these commands give
    ```
    0x400
    ```
    With this PR these commands give
    ```
    0x200
    ```
    as expected.
3. Use the following commands:
    ```
    BOARD=nucleo-l496zg make -C tests/riotboot info-debug-variable-RIOTBOOT_LEN
    BOARD=p-nucleo-wb55 make -C tests/riotboot info-debug-variable-RIOTBOOT_LEN
    ```
    In master these commands give
    ```
    0x1000
    ```
    With this PR these commands give
    ```
    0x2000
    ```
    as expected.

### Issues/PRs references


19639: tests/net/gnrc_mac_timeout: add automated test r=aabadie a=aabadie



19644: gnrc_ipv6_nib: include RIO with all subnets in downstream RA r=benpicco a=benpicco



19649: gnrc_sixlowpan_iphc: prefix bits outside context must be zero r=benpicco a=benpicco



19656: gnrc/ipv6_auto_subnets: allow to configure minimal prefix length r=benpicco a=benpicco



Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-05-23 20:02:58 +00:00
bors[bot]
3469fce248
Merge #19335 #19581 #19612 #19643 #19655
19335: ipv6/nib: 6LBR should not send RS on their downstream interface r=fabian18 a=fabian18



19581: cpu/samd5x: enable FDPLL1 at 200MHz r=benpicco a=dylad

### Contribution description

This PR allows to use the second FDPLL (the first one is used to generated the 120MHz frequency used by the core and some peripherals). The second FDPLL is setup to run at 200MHz which is the maximum allowed by this MCU.
In fact, I reused the existing function which setup FDPLL0 so it can be used in a generic way for both PLL (since they are the same IP).

I change the way the computation offset (left shift by 5)  is done because 200MHz << 5 wouldn't fit inside an `uint32_t` and I wanted to avoid using an `uint64_t` here

Two additional commits are present for a small cleanup and a fix.

This is currently unused in our codebase, so it shouldn't impact this platform too much as the `ONDEMAND` bit is set. the FDPLL will not be running out of the box. But `@gschorcht` might need it pretty soon.

### Testing procedure

This PR can be tested on a `same54-xpro` and an oscilloscope using the following the patch:
```
From 76490845ec72387b24116bdd364a61365c186aa1 Mon Sep 17 00:00:00 2001
From: Dylan Laduranty <dylan.laduranty@mesotic.com>
Date: Thu, 11 May 2023 17:42:16 +0200
Subject: [PATCH] removeme! for debug purpose

Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
---
 cpu/samd5x/cpu.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/cpu/samd5x/cpu.c b/cpu/samd5x/cpu.c
index f778991a5b..2866c8c9e5 100644
--- a/cpu/samd5x/cpu.c
+++ b/cpu/samd5x/cpu.c
`@@` -220,7 +220,7 `@@` static void fdpll_init(uint8_t idx, uint32_t f_cpu)
 }
 
 static void gclk_connect(uint8_t id, uint8_t src, uint32_t flags) {
-    GCLK->GENCTRL[id].reg = GCLK_GENCTRL_SRC(src) | GCLK_GENCTRL_GENEN | flags | GCLK_GENCTRL_IDC;
+    GCLK->GENCTRL[id].reg = GCLK_GENCTRL_SRC(src) | GCLK_GENCTRL_GENEN | flags | GCLK_GENCTRL_OE | GCLK_GENCTRL_IDC;
     while (GCLK->SYNCBUSY.reg & GCLK_SYNCBUSY_GENCTRL(id)) {}
 }
 
`@@` -384,6 +384,12 `@@` void cpu_init(void)
     dma_init();
 #endif
 
+    sam0_gclk_enable(SAM0_GCLK_200MHZ);
+    /* output both FDPLL (GCLK0 and GCLK4) to gpios */
+    gpio_init_mux(GPIO_PIN(PB, 14), GPIO_MUX_M);
+    gpio_init_mux(GPIO_PIN(PB, 10), GPIO_MUX_M);
+    /* PB14 -> EXT2    PB10 -> QSPI SCK */
+
     /* initialize stdio prior to periph_init() to allow use of DEBUG() there */
     early_init();
 
-- 
2.35.3
```

It will output both FDPLLs to PB14 and PB10. Their frequency can then be measured using an oscilloscope.


### Issues/PRs references
None.

19612: pkg/ndn-riot: drop unmaintained pkg r=benpicco a=maribu

### Contribution description

Upstream [1] has seen no activity since 2018, so it safe to assume this is dead. It is reasonable to assume that any users - if there ever were any - have moved on.

Fixes https://github.com/RIOT-OS/RIOT/issues/15638

[1]: https://github.com/named-data-iot/ndn-riot


19643: examples/suit_update: some test fixes r=aabadie a=kaspar030



19655: net/ipv6: make use of clz in ipv6_addr_match_prefix() r=benpicco a=benpicco



Co-authored-by: Fabian Hüßler <fabian.huessler@st.ovgu.de>
Co-authored-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
Co-authored-by: Kaspar Schleiser <kaspar@schleiser.de>
Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-05-23 16:23:19 +00:00
Benjamin Valentin
2a7691176b gnrc/ipv6_auto_subnets: allow to configure minimal prefix length 2023-05-23 17:46:39 +02:00
Benjamin Valentin
9358a4430d gnrc/ipv6_auto_subnets: remove superfluous newline 2023-05-23 17:46:39 +02:00
Benjamin Valentin
771e9e9a14 gnrc/ipv6_auto_subnets: remove superfluous newline 2023-05-23 16:48:17 +02:00
Benjamin Valentin
41f9c2593d gnrc_ipv6_nib: include RIO with all subnets in downstream RA 2023-05-23 16:46:41 +02:00
Benjamin Valentin
d8438c47cf net/ipv6: make use of bitarithm_clzb() in ipv6_addr_match_prefix() 2023-05-23 16:15:25 +02:00
Fabian Hüßler
e0d64b1a38 ipv6/nib: 6LBR should not send RS on their downstream interface 2023-05-23 15:44:48 +02:00
Benjamin Valentin
7e9308dd8c gnrc_sixlowpan_iphc: prefix bits outside context must be zero 2023-05-23 14:16:47 +02:00
Benjamin Valentin
8966c14f60 gnrc_ipv6_nib: set default RIO preference to zero
Linux will ignore RIOs with preference NONE, so set the preference
to zero instead.
2023-05-23 13:02:36 +02:00
bors[bot]
dc0fe5283f
Merge #19611 #19640
19611: sys/net/rpl: fix possible NULL dereference r=benpicco a=maribu

### Contribution description

As the title says


19640: core/thread: drop unused thread_arch_t r=benpicco a=maribu

### Contribution description

No architecture makes use of thread_arch_t anymore, so let's drop it.


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
2023-05-22 14:10:24 +00:00
bors[bot]
eb10a5ccd8
Merge #19604
19604: gnrc/ipv6/nib: fix 6Lo ND options on non 6Lo interface r=fabian18 a=fabian18



Co-authored-by: Fabian Hüßler <fabian.huessler@ml-pa.com>
2023-05-22 09:48:14 +00:00
bors[bot]
975f150383
Merge #19621 #19622 #19623 #19626 #19627
19621: sys: add Kconfig support for clif r=MrKevinWeiss a=aabadie



19622: sys: add some missing kconfig + adapt related tests when possible r=aabadie a=aabadie



19623: pkg/libbase58: add kconfig support r=MrKevinWeiss a=aabadie



19626: sys/gnrc_lorawan: remove deprecated tx port option r=aabadie a=aabadie



19627: makefiles/pseudomodules: remove deprecated event_thread_lowest module r=aabadie a=aabadie



Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
2023-05-20 07:13:34 +00:00
889d753ed6
sys/ 2023-05-19 16:07:01 +02:00
cfb5000d5c
sys/gnrc/lorawan: remove handling of deprecated tx port 2023-05-19 16:06:53 +02:00
chudov
c52f6e71c2 drivers/at86rf2xx: rx timestamp generation for ATmegaRFR2
Signed-off-by: chudov <chudov@gmail.com>
2023-05-19 15:33:15 +02:00
Marian Buschsieweke
273f92a411
sys/net/rpl: fix possible NULL dereference
fixes https://github.com/RIOT-OS/RIOT/issues/15006
2023-05-18 01:25:13 +02:00
Fabian Hüßler
ea9995ecca gnrc/ipv6/nib: fix 6Lo ND options on non 6Lo interface
If a 6Lo router sends and RA over a non-6Lo interface it should not include the options which are specifically for 6Lo ND
2023-05-17 15:49:46 +02:00
bors[bot]
bbe952cb8c
Merge #19553
19553: nanocoap_sock: remove nanocoap_get() r=maribu a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-05-15 20:47:28 +00:00
chudov
516df5cdb6 gnrc/gnrc_netif_hdr_print: printout timestamp if enabled
Signed-off-by: chudov <chudov@gmail.com>
2023-05-15 12:52:35 +02:00
Benjamin Valentin
82929ccea3 nanocoap_sock: remove nanocoap_get()
The function has been deprecated in favor of nanocoap_sock_get()
2023-05-05 15:17:34 +02:00
bors[bot]
c4b27d8241
Merge #19523 #19527 #19530 #19532 #19533 #19535
19523: boards/iotlab-m3: enable l3g4200d_ng r=benpicco a=benpicco



19527: drivers/sdcard_spi: small cleanup r=benpicco a=gschorcht

### Contribution description

This PR provides a small cleanup:
- the copy of `sdcard_spi_params_t` is removed (commit bfc2a51f70)
- the documentation was changed to fit the 100 characters per line. (commit 36f0162b34)

It is not necessary to hold a complete copy `sdcard_spi_params_t` in the device descriptor. Constant parameters can be used directly from ROM instead. This saves 24 bytes of RAM.

### Testing procedure

Use any board with SD Card SPI interface. The driver test should still work, for example:
```
BOARD=esp32-wrover-kit make -j8 -C tests/driver_sdcard_spi flash term
```
```
main(): This is RIOT! (Version: 2023.07-devel-176-g7213c-drivers/sdcard_spi_cleanup)
SD-card spi driver test application
insert SD-card and use 'init' command to set card to spi mode
WARNING: using 'write' or 'copy' commands WILL overwrite data on your sd-card and
almost for sure corrupt existing filesystems, partitions and contained data!
> init
Initializing SD-card at SPI_0...
[OK]
> 
```

### Issues/PRs references


19530: sys/xtimer: add missing "modules.h" include to `xtimer.h` r=benpicco a=kaspar030



19532: tests/unittests: tests-core-mbox: add missing `container.h` include r=benpicco a=kaspar030



19533: core: move macros/math.h to core/lib/include/macros r=benpicco a=kaspar030



19535: nanocoap_sock: defuse nanocoap_sock_get() API footgun r=benpicco a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Kaspar Schleiser <kaspar@schleiser.de>
2023-05-02 13:37:57 +00:00
Benjamin Valentin
f6f5b13744 nanocoap_sock: don't use return buffer for request 2023-05-02 15:02:56 +02:00
Marian Buschsieweke
c3500eb6e0
tree wide: fix typos in comments found by codespell
This will not change generated binaries, only the Doxygen output and
source code will have less typos.
2023-05-02 09:52:06 +02:00
bors[bot]
23f7087845
Merge #19315
19315: cpu/native: add host fs access via VFS r=benpicco a=benpicco



Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de>
Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-04-25 23:14:45 +00:00
Benjamin Valentin
f78911ebf7 gcoap_fileserver: set permissions on create 2023-04-26 00:53:14 +02:00
bors[bot]
46af92d3a0
Merge #18620 #19296 #19504 #19506
18620: core: add core_mutex_debug to aid debugging deadlocks r=maribu a=maribu

### Contribution description

Adding `USEMODULE += core_mutex_debug` to your `Makefile` results in
on log messages such as

    [mutex] waiting for thread 1 (pc = 0x800024d)

being added whenever `mutex_lock()` blocks. This makes tracing down
deadlocks easier.

### Testing procedure

Run e.g.

```sh
USEMODULE=core_mutex_debug BOARD=nucleo-f767zi make -C tests/mutex_cancel flash test
```

which should provide output such as

```
Welcome to pyterm!
Type '/exit' to exit.
READY
s
[mutex] waiting for thread 1 (pc = 0x8000f35)
START
main(): This is RIOT! (Version: 2022.10-devel-841-g5cc02-core/mutex/debug)
Test Application for mutex_cancel / mutex_lock_cancelable
=========================================================

Test without cancellation: OK
Test early cancellation: OK
Verify no side effects on subsequent calls: [mutex] waiting for thread 1 (pc = 0x800024d)
OK
Test late cancellation: [mutex] waiting for thread 1 (pc = 0x0)
OK
TEST PASSED
```

```sh
$ arm-none-eabi-addr2line -a 0x800024d -e tests/mutex_cancel/bin/nucleo-f767zi/tests_mutex_cancel.elf 
0x0800024d
/home/maribu/Repos/software/RIOT/tests/mutex_cancel/main.c:51
```

### Issues/PRs references

Depends on and includes https://github.com/RIOT-OS/RIOT/pull/18619

19296: nanocoap: allow to define CoAP resources as XFA r=maribu a=benpicco



19504: cpu/cc26xx_cc13xx: Fix bogus array-bound warning r=maribu a=maribu

### Contribution description

GCC 12 create a bogus array out of bounds warning as it assumes that because there is special handling for `uart == 0` and `uart == 1`, `uart` can indeed be `1`. There is an `assert(uart < UART_NUMOF)` above that would blow up prior to any out of bounds access.

In any case, optimizing out the special handling of `uart == 1` for when `UART_NUMOF == 1` likely improves the generated code and fixes the warning.

    /home/maribu/Repos/software/RIOT/cc2650/cpu/cc26xx_cc13xx/periph/uart.c:88:8: error: array subscript 1 is above array bounds of 'uart_isr_ctx_t[1]' [-Werror=array-bounds]
       88 |     ctx[uart].rx_cb = rx_cb;
          |     ~~~^~~~~~
    /home/maribu/Repos/software/RIOT/cc2650/cpu/cc26xx_cc13xx/periph/uart.c:52:23: note: while referencing 'ctx'
       52 | static uart_isr_ctx_t ctx[UART_NUMOF];
          |                       ^~~
    /home/maribu/Repos/software/RIOT/cc2650/cpu/cc26xx_cc13xx/periph/uart.c:89:8: error: array subscript 1 is above array bounds of 'uart_isr_ctx_t[1]' [-Werror=array-bounds]
       89 |     ctx[uart].arg = arg;
          |     ~~~^~~~~~
    /home/maribu/Repos/software/RIOT/cc2650/cpu/cc26xx_cc13xx/periph/uart.c:52:23: note: while referencing 'ctx'
       52 | static uart_isr_ctx_t ctx[UART_NUMOF];
          |                       ^~~

### Testing procedure

The actual change is a pretty obvious one-liner, so that code review and a green CI should be sufficient. If not, running any UART example app without regression should do.

### Issues/PRs references

None

19506: tools/openocd: Fix handling of OPENOCD_CMD_RESET_HALT r=maribu a=maribu

### Contribution description

The OPENOCD_CMD_RESET_HALT was not longer correctly passed to the script. This fixes the issue.

### Testing procedure

Flashing of e.g. the `cc2650-launchpad` with upstream OpenOCD should work again.

### Issues/PRs references

The change was added to https://github.com/RIOT-OS/RIOT/pull/19050 after testing the PR and before merging. I'm not sure if the fix never worked because of this, or if behavior of `target-export-variables` or GNU Make changed.

Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-04-25 15:46:11 +00:00
0c52207544
Merge pull request from GHSA-xqm8-xj74-fjw2
gnrc_sixlowpan_iphc: check IPHC dispatch for truncation
2023-04-21 11:56:49 +02:00
287f030af2
Merge pull request from GHSA-xfj4-9g7w-f4gh
fixes for CVE-2023-24826
2023-04-21 11:54:57 +02:00
Martine Lenders
709ddd2ba7 gnrc_sixlowpan_iphc: check IPHC dispatch for truncation 2023-04-21 11:45:27 +02:00
Martine Lenders
4f1e2a3709 gnrc_rpl_srh: check header fields consistency before substraction 2023-04-21 11:40:47 +02:00
Martine Lenders
eb9e50aafe gnrc_sixlowpan_frag_sfr: move timer initialization to init function 2023-04-21 11:30:59 +02:00
Jose Alamos
3c1f5a0dbd
gnrc_netif/lorawan: fix setting nkskey via NETOPT 2023-04-17 12:40:42 +02:00
Benjamin Valentin
9495dc4e2e nanocoap_server: add nanocoap_server_auto_init 2023-03-22 14:43:19 +01:00
Jan Mohr
72107a0873 sys/net/gnrc/netif: fixing no global address wait 2023-03-17 13:45:35 +01:00
Benjamin Valentin
a473ca9ed5 gnrc_static: auto-select interface if there is only one 2023-03-16 12:28:00 +01:00
Benjamin Valentin
3f2d36d14f gnrc_static: fix build if only static address is set 2023-03-16 11:19:53 +01:00
5205151876
cord: convert to ztimer 2023-03-14 18:15:21 +01:00
bors[bot]
9142d9c375
Merge #19383 #19385
19383: cord: include gcoap_req_send returning 0 in error r=benpicco a=bergzand

### Contribution description

gcoap_req_send returns 0 if it was unable to send the CoAP request. CoRD did not include that case in the return code checks. This changes CoRD to include it and drop the registration if CoAP could not send the request. The old behaviour made the CoRD thread lock up.

### Testing procedure

- Check with the gcoap API docs.
- I can reliable trigger the issue with a RIOT application including both the `cord_ep_standalone` module and some measurement reported both sending requests to the same application. If at some point the application is shut down, gcoap has all its memo's occupied with the measurement reporting and can't add the CoRD update request. Thus the CoRD update request fails with a zero code and the thread (previously) would lock up.

### Issues/PRs references

None

19385: cpu/stm32/periph/timer: fix clobered IRQ flag r=benpicco a=Enoch247

### Contribution description

From the git commit:

> The STM32 periph_timer driver reads the timer's status flags, then clears them all. It is possible that a timer interrupt could occur between reading the flag and clearing it. This would lead to a lost interrupt.
> 
> The timer's status flags can be cleared by software, but can only be set by the hardware. This patch takes advantage of this by only clearing the flags it knows are set. The rest of the flags are set, which doesn't actually change their state.

I had trouble finding anything in ST's datasheet saying that software could not set the timer's status flags, but testing showed that this is how it works in practice. Further, [ST's own HAL ](https://github.com/STMicroelectronics/STM32CubeF4/blob/master/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_tim.h#L1258)confirms this. If the hardware didn't work this way, it would be impossible to atomically read-modify-write the flags.

### Testing procedure

I tested by doing the following:

1. `make -C tests/periph_timer BOARD=nucleo-f767zi all flash term`
2. press s
3. press [ENTER]
4. observe test passes
5. `make -C tests/periph_timer_periodic BOARD=nucleo-f767zi all flash term`
6. press s
7. press [ENTER]
8. observe test passes
9. `make -C tests/periph_timer_short_relative_set BOARD=nucleo-f767zi all flash term`
10. press s
11. press [ENTER]
12. observe test passes


### Issues/PRs references

- none known

Co-authored-by: Koen Zandberg <koen@bergzand.net>
Co-authored-by: Joshua DeWeese <jdeweese@primecontrols.com>
2023-03-13 20:25:27 +00:00
19ff949404
cord: include gcoap_req_send returning 0 in error
gcoap_req_send returns 0 if it was unable to send the CoAP request. CoRD
did not include that case in the return code checks. This changes CoRD
to include it and drop the registration if CoAP could not send the
request. The old behaviour made the CoRD thread lock up.
2023-03-13 11:49:37 +01:00
Benjamin Valentin
cc30b819eb gcoap: include CoAP resrouces from NANOCOAP_RESOURCE() XFA 2023-03-09 14:09:15 +01:00
bors[bot]
1a5cc2acbb
Merge #19365 #19366 #19367
19365: bootloaders: fix bootloader button logic r=benpicco a=dylad

### Contribution description

In lastest master, the `BTN_BOOTLOADER_INVERTED` logic doesn't work as expected.
This PR fixes the underlying logic by replacing the `BTN_BOOTLOADER_INVERTED` macro definition by a runtime function.
In fact the current code:
```
#ifndef BTN_BOOTLOADER_INVERTED
#if (BTN0_MODE == GPIO_IN_PD)
#define BTN_BOOTLOADER_INVERTED false
#else
#define BTN_BOOTLOADER_INVERTED true
#endif
#endif
```
cannot work because both `BTN0_MODE` and `GPIO_IN_PD` are not known by the precompiler as they are enum values defined at cpu level.
Thus, replaces it by a runtime function in our bootloader applications.
I've also add `GPIO_OD_PU` along side `GPIO_IN_PU` and add a new define (which can be override at board level or app level) in case an external pullup is used.

### Testing procedure
Flash the riotboot_dfu bootloader:
`make BOARD=saml21-xpro -C bootloaders/riotboot_dfu flash`
Then, flash any test app:
`PROGRAMMER=dfu-util USEMODULE=usbus_dfu make BOARD=saml21-xpro -C tests/shell riotboot/flash-slot0`

With master, the application will not start.
With this PR, the application will start after flashing.

### Issues/PRs references
Fixes #19364 


19366: nanocoap_sock: don't include token in empty ACK response r=benpicco a=benpicco



19367: cord: bump reference from draft to rfc r=benpicco a=bergzand

### Contribution description

The draft is an RFC, this bumps the "see also" in the docs to the rfc.

### Testing procedure

Check that the correct RFC is linked in the docs.

### Issues/PRs references

None


Co-authored-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Koen Zandberg <koen@bergzand.net>
2023-03-08 12:23:24 +00:00
Benjamin Valentin
d6e05dae7f nanocoap_sock: don't include token in empty ACK response 2023-03-08 11:38:09 +01:00
Benjamin Valentin
ad8dd8d061 nanocoap_sock: ensure response address is the same as request address 2023-03-07 16:58:17 +01:00
Benjamin Valentin
a7866f78a1 gcoap: make use of sock_udp_ep_is_multicast() 2023-03-07 16:58:17 +01:00
Benjamin Valentin
9faa323c83 gnrc_netif: set lower bound for IEEE802154_STACKSIZE_DEFAULT
Since it was ported to the radio HAL, at86rf2xx requires more stack:

2023-03-02 01:00:52,637 # 	pid | name                 | state    Q | pri | stack  ( used) ( free) | base addr  | current
2023-03-02 01:00:52,646 # 	  1 | idle                 | pending  Q |  15 |    192 (  130) (   62) |     0x263a |     0x269f
2023-03-02 01:00:52,655 # 	  2 | main                 | running  Q |   7 |   2560 ( 1732) (  828) |     0x26fa |     0x2cb1
2023-03-02 01:00:52,663 # 	  3 | 6lo                  | bl rx    _ |   3 |    512 (  276) (  236) |     0x5446 |     0x559b
2023-03-02 01:00:52,672 # 	  4 | ipv6                 | bl rx    _ |   4 |    512 (  372) (  140) |     0x318e |     0x32c4
2023-03-02 01:00:52,681 # 	  5 | udp                  | bl rx    _ |   5 |    256 (  214) (   42) |     0x5648 |     0x569d
2023-03-02 01:00:52,689 # 	  6 | at86rf2xx            | bl anyfl _ |   2 |    520 (  514) (    6) |     0x3582 |     0x371f
2023-03-02 01:00:52,697 # 	    | SUM                  |            |     |   4552 ( 3238) ( 1314)
2023-03-02 01:01:30 +01:00
Martine Lenders
13f613429d gnrc_sixlowpan_frag_sfr_congure: add congure_abe support 2023-03-01 20:23:32 +01:00
Martine Lenders
33402296d3
gnrc_sixlowpan_frag_sfr_congure: add congure_reno support 2023-03-01 16:32:31 +01:00
Martine Lenders
d0986caf03
gnrc_sixlowpan_frag_sfr_congure: add congure_quic support 2023-03-01 13:08:17 +01:00
bors[bot]
04ef37274f
Merge #16158
16158: gnrc_sixlowpan_frag_sfr_congure_sfr: initial import r=miri64 a=miri64



Co-authored-by: Martine Lenders <m.lenders@fu-berlin.de>
2023-03-01 08:32:45 +00:00
Benjamin Valentin
44c267c84a nanocoap: allow to define CoAP resources as XFA 2023-02-28 20:13:18 +01:00
Benjamin Valentin
69989d3c5f sixlowpan: replace puts() with printf() 2023-02-27 15:43:00 +01:00
bors[bot]
9d1d4bb1b2
Merge #19119 #19313
19119: makefiles/tools/serial.inc.mk: Allow detection of debug adapter r=benpicco a=maribu

### Contribution description

This PR adds the ability to automatically detect the debug adapter for boards with an integrated programmer/debugger, if that debugger also provides the TTY.

This extends the TTY detection that can be enabled with `MOST_RECENT_PORT=1` to set `DEBUG_ADAPTER_ID` to the TTY's serial, but only if `DEBUG_ADAPTER_ID_IS_TTY_SERIAL` is set to `1` by the board (as not all boards have an integrated programmer/debugger).

### Testing procedure

Connect a HiFive-1B and a nRF52840DK at the same time and try `make BOARD=<nrf52840dk|hifive1b> MOST_RECENT_PORT=1 -C examples/default flash term` for both. The programmer will not reliably select the correct programmer in `master`. With this PR, it will.

### Issues/PRs references

None

19313: gnrc_static: don't parse address as prefix r=benpicco a=benpicco



Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de>
2023-02-24 17:46:10 +00:00
Benjamin Valentin
4e642451c8 gnrc_static: don't parse address as prefix 2023-02-24 16:03:16 +01:00
Benjamin Valentin
7468c6272b nanocoap_link_format: fix off-by-one error 2023-02-23 16:34:56 +01:00
Benjamin Valentin
c09ad471a1 nanocoap: whitespace fixes 2023-02-22 18:03:04 +01:00
bors[bot]
cf540a2648
Merge #19294 #19295
19294: sys/shell: don't include suit command by default r=benpicco a=benpicco



19295: gcoap: Finish the gcoap_get_resource_list_tl -> gcoap_get_resource_list renaming r=benpicco a=chrysn

### Contribution description

In #16688, an argument was added to the `gcoap_get_resource_list` function by creating a new function `gcoap_get_resource_list_tl` with a deprecation and roll-over plan.

This plan has not been acted on so far.

This PR shortens the original plan by just adding the argument to `gcoap_get_resource_list` and removing `gcoap_get_resource_list_tl` in a single go. The rationale for this deviation is that while it's a public API, its only two practical consumers are the (built-in) well-known/core implementation, and the (built-in) CoRE Resource Directory (cord) endpoint. Moreover, a further change to this API (switching over to `coap_block_slicer_t`) is expected to happen within this release cycle, which would take something like 4 total releases to get through otherwise, which is unrealistic for an API that there are no known external users of.

A second commit clean up ToDo items (in the changed function's documentation) that referred to a IETF draft that has long been abandoned by the CoRE WG.

### Testing procedure

Plain inspection and CI passing should suffice.

### AOB

There is a second analogous pair left over from #16688, `gcoap_req_send` / `gcoap_req_send_tl`. As that *is* expected to be used widely, I prefer not to mix these two concerns, and get the present one through without unnecessary hold-up.

Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
Co-authored-by: chrysn <chrysn@fsfe.org>
2023-02-21 23:15:06 +00:00
chrysn
5db24d4f51 gcoap: Rename gcoap_get_resource_list_tl to gcoap_get_resource_list
This is an API change in the latter, which would typically now take an
extra argument GCOAP_SOCKET_TYPE_UNDEF.

Follow-Up-For: https://github.com/RIOT-OS/RIOT/pull/16688
2023-02-21 20:22:46 +01:00
bors[bot]
be29a00d74
Merge #19278 #19290
19278: gnrc_dhcpv6_client_simple_pd: select upstream based on type/index r=benpicco a=benpicco



19290: sys/crypto: make AES_KEY struct private & rename it r=benpicco a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
2023-02-20 19:09:03 +00:00
bors[bot]
96a7d0d466
Merge #19142
19142: sock_dtls: move common code into sock_dtls_establish_session() r=benpicco a=benpicco



Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de>
2023-02-19 22:11:05 +00:00
Benjamin Valentin
df4ef80790 sock_dodtls: make use of sock_dtls_establish_session() 2023-02-19 15:10:46 +01:00
Benjamin Valentin
28289a13cb gnrc_dhcpv6_client_simple_pd: check result of _find_upstream_netif() 2023-02-18 23:59:42 +01:00
Benjamin Valentin
3173150ef7 gnrc_dhcpv6_client_simple_pd: select upstream based on type/index 2023-02-14 17:45:19 +01:00
chrysn
ac3a9cdf83 gcoap: Do not send responses from multicast addresses 2023-02-13 21:46:12 +01:00
chrysn
54037f5c2d gcoap: Alter indirection level of _memo_ep_is_multicast 2023-02-13 20:32:29 +01:00
Benjamin Valentin
5134b5c7d5 nanocoap_sock: make use of sock_dtls_establish_session() 2023-02-08 15:57:28 +01:00
Benjamin Valentin
46764727ab sys/net/sock_util: add sock_dtls_establish_session() 2023-02-08 15:57:22 +01:00
bors[bot]
0fb6a09598
Merge #18903
18903: pkg/tinyusb: add tinyUSB netdev driver r=dylad a=gschorcht

### Contribution description

This PR adds the tinyUSB netdev driver.

The tinyUSB netdev driver is part of the tinyUSB package and is enabled by module `tinyusb_netdev`. It is available for boards that provide the `tinyusb_device` feature.

**Please note** Since the tinyUSB package is distinct from (and incompatible with) the USB stack provided around USBUS in RIOT (see USB), the tinyUSB netdev driver cannot be used together with with any USBUS device class.

The tinyUSB netdev driver uses Ethernet over USB and supports the following protocols:
- CDC ECM (Ethernet Control Model)
- CDC NCM (Network Control Model)
- RNDIS (Microsoft Remote NDIS)

While Linux and macOS support all these protocols, Microsoft Windows only supports the RNDIS protocol and since Windows version 11 also the CDC NCM protocol. macOS supports the RNDIS protocol since version 10.15 (Catalina).

Which protocol is used is selected by the corresponding pseudomodules `tinyusb_class_net_cdc_ecm`, `tinyusb_class_net_cdc_ncm` and `tinyusb_class_net_rndis`.

The CDC ECM protocol (`tinyusb_class_net_cdc_ecm`) and the RNDIS protocol (`tinyusb_class_net_rndis`) can be used simultaneously to support all operating systems, for example :
```
USEMODULE='tinyusb_netdev tinyusb_class_net_rndis tinyusb_class_net_cdc_ecm' \
BOARD=... make -C ... flash
 ```
In this case, the CDC ECM protocol is the default protocol and the RNDIS protocol the alternative protocol defined as second device configuration. The CDC NCM protocol cannot be used together with the CDC ECM or the RNDIS protocol.

This PR includes PR #18983 for now to be compilable. 

Comparison with USBUS CDC ECM (`nucleo-f767zi` board):
```
   text	   data	    bss	    dec	    hex	filename
  65916	    596	  18728	  85240	  14cf8	tests_pkg_tinyusb_netdev.elf
```
```
   text	   data	    bss	    dec	    hex	filename
  63120	    544	  15444	  79108	  13504	tests_usbus_cdc_ecm.elf

```

### Testing procedure

Use a board that is supported by tinyUSB. Compile and flash the test application for each protocol:

1. RNDIS
    ```
    BOARD=... make -j8 -C tests/pkg_tinyusb_netdev flash
    ```
2. CDC ECM
    ```
    CLASS=tinyusb_class_net_cdc_ecm BOARD=... make -j8 -C tests/pkg_tinyusb_netdev flash
    ```
3. CDC NCM
    ```
    CLASS=tinyusb_class_net_cdc_ncm BOARD=... make -j8 -C tests/pkg_tinyusb_netdev flash
    ```
For each test, a network interface should be added on the host. Use command `ifconfig` on USB device and on the host and check that both have a link local address. In syslog there should be an output like the following:
<details>

```
Nov 13 18:14:46 gunny8 kernel: [4611465.480025] usb 1-2.2: new full-speed USB device number 28 using xhci_hcd
Nov 13 18:14:47 gunny8 kernel: [4611465.581641] usb 1-2.2: New USB device found, idVendor=1209, idProduct=7d01, bcdDevice= 1.00
Nov 13 18:14:47 gunny8 kernel: [4611465.581646] usb 1-2.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Nov 13 18:14:47 gunny8 kernel: [4611465.581650] usb 1-2.2: Product: nucleo-f767zi
Nov 13 18:14:47 gunny8 kernel: [4611465.581653] usb 1-2.2: Manufacturer: RIOT-os.org
Nov 13 18:14:47 gunny8 kernel: [4611465.581654] usb 1-2.2: SerialNumber: 6591620BCB270283
Nov 13 18:14:47 gunny8 vmnetBridge: RTM_NEWLINK: name:usb0 index:508 flags:0x00001002
Nov 13 18:14:47 gunny8 vmnet-natd: RTM_NEWLINK: name:usb0 index:508 flags:0x00001002
Nov 13 18:14:47 gunny8 NetworkManager[24229]: <info>  [1668359687.1066] manager: (usb0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/528)
Nov 13 18:14:47 gunny8 kernel: [4611465.594604] rndis_host 1-2.2:1.0 usb0: register 'rndis_host' at usb-0000:00:14.0-2.2, RNDIS device, fa:db:7c:1b:58:80
Nov 13 18:14:47 gunny8 mtp-probe: checking bus 1, device 28: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2.2"
Nov 13 18:14:47 gunny8 mtp-probe: bus: 1, device: 28 was not an MTP device
Nov 13 18:14:47 gunny8 systemd-udevd[17796]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Nov 13 18:14:47 gunny8 vmnet-natd: RTM_NEWLINK: name:usb0 index:508 flags:0x00001002
Nov 13 18:14:47 gunny8 kernel: [4611465.643852] rndis_host 1-2.2:1.0 enp0s20f0u2u2: renamed from usb0
Nov 13 18:14:47 gunny8 vmnetBridge: RTM_NEWLINK: name:usb0 index:508 flags:0x00001002
Nov 13 18:14:47 gunny8 vmnet-natd: RTM_NEWLINK: name:enp0s20f0u2u2 index:508 flags:0x00001002
Nov 13 18:14:47 gunny8 vmnetBridge: RTM_NEWLINK: name:enp0s20f0u2u2 index:508 flags:0x00001002
Nov 13 18:14:47 gunny8 NetworkManager[24229]: <info>  [1668359687.1833] device (usb0): interface index 508 renamed iface from 'usb0' to 'enp0s20f0u2u2'
Nov 13 18:14:47 gunny8 upowerd[2845]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2.2/1-2.2:1.1
Nov 13 18:14:47 gunny8 NetworkManager[24229]: <info>  [1668359687.2037] device (enp0s20f0u2u2): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Nov 13 18:14:47 gunny8 vmnet-natd: RTM_NEWLINK: name:enp0s20f0u2u2 index:508 flags:0x00011043
Nov 13 18:14:47 gunny8 vmnetBridge: RTM_NEWLINK: name:enp0s20f0u2u2 index:508 flags:0x00011043
Nov 13 18:14:47 gunny8 vmnetBridge: Adding interface enp0s20f0u2u2 index:508
Nov 13 18:14:47 gunny8 NetworkManager[24229]: <info>  [1668359687.2075] device (enp0s20f0u2u2): carrier: link connected
Nov 13 18:14:47 gunny8 upowerd[2845]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2.2/1-2.2:1.0
Nov 13 18:14:47 gunny8 NetworkManager[24229]: <info>  [1668359687.2129] settings: (enp0s20f0u2u2): created default wired connection 'Kabelgebundene Verbindung 2'
Nov 13 18:14:47 gunny8 NetworkManager[24229]: <warn>  [1668359687.2142] device (enp0s20f0u2u2): connectivity: "/proc/sys/net/ipv4/conf/enp0s20f0u2u2/rp_filter" is set to "1". This might break connectivity checking for IPv4 on this device
Nov 13 18:14:47 gunny8 NetworkManager[24229]: <info>  [1668359687.2151] device (enp0s20f0u2u2): state change: unavailable -> disconnected (reason 'none', sys-iface-state: 'managed')
Nov 13 18:14:47 gunny8 vmnetBridge: RTM_NEWLINK: name:enp0s20f0u2u2 index:508 flags:0x00011043
Nov 13 18:14:47 gunny8 vmnet-natd: RTM_NEWLINK: name:enp0s20f0u2u2 index:508 flags:0x00011043
Nov 13 18:14:47 gunny8 upowerd[2845]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2.2
Nov 13 18:14:47 gunny8 systemd-udevd[17796]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Nov 13 18:14:47 gunny8 NetworkManager[24229]: <info>  [1668359687.2403] policy: auto-activating connection 'Kabelgebundene Verbindung 2' (0b1ae45e-c76e-3efb-a2cd-138ca2b2a59c)
Nov 13 18:14:47 gunny8 NetworkManager[24229]: <info>  [1668359687.2414] device (enp0s20f0u2u2): Activation: starting connection 'Kabelgebundene Verbindung 2' (0b1ae45e-c76e-3efb-a2cd-138ca2b2a59c)
Nov 13 18:14:47 gunny8 NetworkManager[24229]: <info>  [1668359687.2419] device (enp0s20f0u2u2): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Nov 13 18:14:47 gunny8 NetworkManager[24229]: <info>  [1668359687.2429] device (enp0s20f0u2u2): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Nov 13 18:14:47 gunny8 NetworkManager[24229]: <info>  [1668359687.2440] device (enp0s20f0u2u2): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Nov 13 18:14:47 gunny8 NetworkManager[24229]: <info>  [1668359687.2445] dhcp4 (enp0s20f0u2u2): activation: beginning transaction (timeout in 45 seconds)
Nov 13 18:14:47 gunny8 vmnetBridge: RTM_NEWLINK: name:enp0s20f0u2u2 index:508 flags:0x00011043
Nov 13 18:14:47 gunny8 vmnet-natd: RTM_NEWLINK: name:enp0s20f0u2u2 index:508 flags:0x00011043
Nov 13 18:14:47 gunny8 avahi-daemon[1464]: Joining mDNS multicast group on interface enp0s20f0u2u2.IPv6 with address fe80::dba4:adb8:9ffe:d93e.
Nov 13 18:14:47 gunny8 avahi-daemon[1464]: New relevant interface enp0s20f0u2u2.IPv6 for mDNS.
Nov 13 18:14:47 gunny8 avahi-daemon[1464]: Registering new address record for fe80::dba4:adb8:9ffe:d93e on enp0s20f0u2u2.*.
Nov 13 18:14:47 gunny8 kernel: [4611465.895046] userif-1: sent link down event.
Nov 13 18:14:47 gunny8 kernel: [4611465.895052] userif-1: sent link up event.
```

</details>

Ping from and to the host.

### Issues/PRs references

Depends on PR https://github.com/RIOT-OS/RIOT/pull/18983

Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2023-02-03 09:32:29 +00:00
bors[bot]
247b8d0a47
Merge #19235 #19236 #19237 #19238
19235: pkg/nimble/autoadv: fix flag comparisons r=benpicco a=kaspar030



19236: sys/vfs: vfs.c missing includes r=benpicco a=kaspar030



19237: sys/net/crosslayer/inet_csum: add missing "modules.h" include r=benpicco a=kaspar030



19238: sys/net/grnc/netreg: avoid creating an infinite loop r=benpicco a=benpicco



Co-authored-by: Kaspar Schleiser <kaspar@schleiser.de>
Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-02-02 17:52:10 +00:00
Benjamin Valentin
b7a5261508 sys/net/grnc/netreg: avoid creating an infinite loop 2023-02-02 17:56:19 +01:00
1db6c4a9de sys/net/crosslayer/inet_csum: add missing "modules.h" include 2023-02-02 16:37:21 +01:00
Benjamin Valentin
0a453ae679 sys/net/dhcpv6: let dhcpv6_client_req_ia_pd() return error 2023-02-01 23:25:22 +01:00
Benjamin Valentin
54fe031705 sys/net/dhcpv6: add IA Prefix Option in SOLICIT
Add the IA Prefix Option when soliciting a prefix so we can tell the
server what prefix length we want.
2023-02-01 23:25:22 +01:00
Gunar Schorcht
e7d0fbbc71 sys/net/gnrc/netif: add tinyUSB netdev to auto_init 2023-02-01 21:58:01 +01:00
Benjamin Valentin
ff52d35584 gnrc_ipv6_nib: use static DNS server from auto_init_sock_dns if present 2023-01-27 19:15:13 +01:00
Benjamin Valentin
acf2074369 examples/gnrc_border_router: static: use router from advertisements by default 2023-01-27 18:01:00 +01:00
Martine Lenders
914ca26bc7
gnrc_sixlowpan_frag_sfr_congure_sfr: initial import 2023-01-20 08:25:11 +01:00
Benjamin Valentin
d041a5fb1a nanocoap_sock: store message ID in nanocoap_sock_t 2023-01-20 01:50:10 +01:00
bors[bot]
d11a358b1d
Merge #18472 #19175
18472: drivers/mrf24j40: add support for IEEE 802.15.4 Radio HAL r=benpicco a=jia200x



19175: drivers/periph_common/flashpage: fix silent error r=benpicco a=Enoch247

### Contribution description

This patch removes a test that silently hides failed writes to NULL. Instead, assert is used to ensure that the address is not NULL.


### Testing procedure

I am not certain how to update the tests to catch asserts. If this is possible, I will add a test, if someone will point me to a good example to learn from.


### Issues/PRs references

- none


Co-authored-by: Jose Alamos <jose@alamos.cc>
Co-authored-by: Joshua DeWeese <jdeweese@primecontrols.com>
2023-01-19 18:17:13 +00:00
Jose Alamos
fc0e59cac3
ieee802154/submac/Kconfig: select ZTIMER 2023-01-19 15:34:20 +01:00
Jose Alamos
91a299cb7d
drivers/mrf24j40: add support for IEEE 802.15.4 Radio HAL 2023-01-19 15:31:06 +01:00
Benjamin Valentin
f6c1ab35a3 gnrc_icmpv6_echo: implement gnrc_icmpv6_echo_{send, req_handle}() 2023-01-18 14:47:24 +01:00
bors[bot]
d6f44f6206
Merge #18414
18414: gcoap/fileserver: add event callbacks r=benpicco a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-01-16 22:23:46 +00:00
bors[bot]
211db05401
Merge #18477 #19101 #19155
18477: gnrc_static: add static network configuration r=miri64 a=benpicco



19101: CI: update check-labels-action r=miri64 a=kaspar030



19155: Revert "sys/pm_layered: pm_(un)block add attribute optimize(3)" r=maribu a=Teufelchen1

Revert "sys/pm_layered: pm_(un)block add attribute optimize(3) -shortens hotpath"

This reverts commit 5447203921.

### Contribution description

Compiling `examples/gnrc_networking_mac` using `TOOLCHAIN=llvm` yields the following error:
```
RIOT/sys/pm_layered/pm.c:77:16: error: unknown attribute 'optimize' ignored [-Werror,-Wunknown-attributes]
__attribute__((optimize(3)))
```
As indicated, this is because the attribute `optimize` is GCC only and not present in LLVM.
Compare the manpages of [GCC](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html) and [LLVM](https://clang.llvm.org/docs/AttributeReference.html).


### Testing procedure

Since this should only affect performance and not behavior, no special testing is needed. I am not aware of any tests in RIOT which could verify that assumption.

### Issues/PRs references

Introduced in #18846

There is another instance of this attribute being used in[ shell_lock.c](6fb340d654/sys/shell_lock/shell_lock.c (L80)). Since the usage is security related, I omit it from this PR.


Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Kaspar Schleiser <kaspar@schleiser.de>
Co-authored-by: Teufelchen1 <bennet.blischke@haw-hamburg.de>
2023-01-16 14:03:15 +00:00
Benjamin Valentin
47295cc929 gcoap/fileserver: add event callbacks 2023-01-16 10:25:00 +01:00
bors[bot]
fb603f2660
Merge #18459 #18724 #19081 #19082 #19136
18459: makefiles/suit: make it possible to accept multiple SUIT keys r=miri64 a=benpicco



18724: nanocoap_sock: implement DTLS socket r=miri64 a=benpicco



19081: sys/stdio_udp: add stdio over UDP r=benpicco a=benpicco



19082: core/init: add early_init() r=benpicco a=benpicco



19136: CI: re-add "synchronize" event to check-labels r=miri64 a=kaspar030



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
Co-authored-by: Kaspar Schleiser <kaspar@schleiser.de>
2023-01-13 13:50:55 +00:00
Benjamin Valentin
81625fd5f2 doc: sort all stdio implementations into sys_stdio group 2023-01-13 11:08:22 +01:00
Benjamin Valentin
d660e3ebbd nanocoap_sock: implement DTLS socket 2023-01-13 00:17:32 +01:00
Benjamin Valentin
ad5b27df8e nanocoap_sock: make nanocoap_sock_t a proper struct 2023-01-13 00:08:55 +01:00
bors[bot]
385569c7bf
Merge #17810 #18348 #19120
17810: drivers/slipdev: implement sleep states r=benpicco a=benpicco



18348: sys/net/gnrc/pktbuf_static: make use of alignas() r=maribu a=maribu

### Contribution description

Since we are now using C11, we can make use of `alignas()` provided by `<stdalign.h>` to make the alignment code easier to read.

### Testing procedure

I didn't expect this to change binaries, but is safes 4 bytes. `elf_diff` shows that the compiler (at least GCC 11.3.0) was not able to detect that `gnrc_pktbuf_static_buf` was just an alias for `_pktbuf_buf`. That makes sense since it would be hard without LTO to rule out external writes to `gnrc_pktbuf_static_buf`, unless one would have added a `const` (to the pointer, not to the data the pointer points to).

The [output of `elf_diff`](https://mari-bu.de/pr_18348_gnrc_pktbuf_static_elf_diff.html) looks otherwise quite unscary.

Also:

```
$ make BOARD=nucleo-f767zi -C tests/unittests/ tests-pktbuf flash test
make: Entering directory '/home/maribu/Repos/software/RIOT/tests/unittests'
Building application "tests_unittests" for "nucleo-f767zi" with MCU "stm32".
[...]
Welcome to pyterm!
Type '/exit' to exit.
READY
s
START
.............................................
OK (45 tests)

make: Leaving directory '/home/maribu/Repos/software/RIOT/tests/unittests'
```

### Issues/PRs references

None

19120: CI: seperate check-labels and check-commits workflows r=maribu a=kaspar030



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
Co-authored-by: Kaspar Schleiser <kaspar@schleiser.de>
2023-01-10 15:44:57 +00:00
bors[bot]
53176f7b9e
Merge #18134 #18738 #18939 #19118
18134: nanocoap_link_format: add helper function to parse Link Format r=kaspar030 a=benpicco



18738: nanocoap_sock: implement nanocoap_sock_delete() r=maribu a=benpicco



18939: gnrc_ipv6_nib: clean up _resolve_addr() r=maribu a=benpicco



19118: sys/ztimer: ztimer_mock: guard ztimer_ondemand static functions r=kaspar030 a=kaspar030



Co-authored-by: Benjamin Valentin <benpicco@beuth-hochschule.de>
Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
Co-authored-by: Kaspar Schleiser <kaspar@schleiser.de>
2023-01-10 11:25:32 +00:00
Benjamin Valentin
64a2fbcebd gnrc_ipv6_nib: clean up _resolve_addr() 2023-01-09 14:04:47 +01:00
Benjamin Valentin
59f067171f core/init: call vfs_bind_stdio() in early_init() 2023-01-08 22:26:13 +01:00
Marian Buschsieweke
86fdbd7054
core/lib: Add macros/utils.h header
The macros CONCAT(), MIN(), and MAX() are defined over and over again in
RIOT's code base. This de-duplicates the code by moving the macros to a
common place.
2023-01-07 09:47:44 +01:00
bors[bot]
6cf2116ae8
Merge #18773
18773: nanocoap_sock: fix handling empty ACKs with separate response r=maribu a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de>
2023-01-06 01:07:57 +00:00
bors[bot]
2ea6a2af1e
Merge #19053
19053: net/ieee802154: make default ack request configurable r=jia200x a=jue89



Co-authored-by: Jue <me@jue.yt>
2022-12-15 10:15:31 +00:00
Jue
8f174bbef2 ieee802154_submac: migrate to ztimer 2022-12-14 16:41:27 +01:00
Jue
6ff38347b3 net/ieee802154: add option for default ack request 2022-12-14 16:29:01 +01:00
Benjamin Valentin
7b7c63b638 nanocoap_link_format: add helper function to parse link format 2022-12-11 23:39:47 +01:00
Benjamin Valentin
249901bc96 gnrc_static: add static network configuration 2022-12-11 23:34:09 +01:00
Benjamin Valentin
15c8ad2e8e sys/net/ipv6: add ipv6_prefix_from_str() 2022-12-11 23:34:09 +01:00
benpicco
e6284ec244
Merge pull request #18816 from benpicco/nanocoap_handle_req-ctx
nanocoap: add request context to coap_handle_req()
2022-11-23 20:36:50 +01:00
Marian Buschsieweke
747ee9d56f
sys/net/grnc/netreg: avoid freeing wild pointers
When freeing any stale pktsnips from stale messages in the mbox, make
sure that the messages actually contains a pktsnip before freeing.
2022-11-22 17:57:44 +01:00
Benjamin Valentin
8a11ca2f87 nanocoap: don't hide coap_request_ctx_t content 2022-11-22 10:41:32 +01:00
Benjamin Valentin
2e2414cef6 gnrc_ipv6_nib: factor out enqueue on resolve 2022-11-20 21:00:40 +01:00
Benjamin Valentin
0886ad4840 gnrc_ipv6_nib: factor out resolve from nc 2022-11-20 20:46:31 +01:00
Benjamin Valentin
7e91d91cea gnrc_tcp: replace RIOT_FILE_RELATIVE with __FILE__ 2022-11-19 01:48:42 +01:00
Benjamin Valentin
442644ba93 gnrc_sock_udp: style fix in sock_udp_recv_buf_aux() 2022-11-15 20:35:20 +01:00
benpicco
e710b6f07c
Merge pull request #18854 from benpicco/gnrc_sock_udp-_remote_mismatch
gnrc_sock_udp: accept response from any address if remote is multicast
2022-11-15 20:33:58 +01:00
Benjamin Valentin
2b92e9ec59 gnrc_sock_udp: accept response from any address if remote is multicast 2022-11-15 11:26:31 +01:00
benpicco
f8964c0149
Merge pull request #18827 from benpicco/nanocoap_block-fix
nanocoap_sock: don't store entire sock in coap_block_request_t
2022-11-08 10:49:39 +01:00
Benjamin Valentin
5a3045117e gnrc_sock_udp: make 'remote match' condition more readable 2022-11-07 16:35:57 +01:00
Teufelchen1
64b4d433b9 gnrc: Fix unused function error when using LLVM 2022-11-06 15:39:39 +00:00
Benjamin Valentin
bd8b6e454d nanocoap_sock: send ACK with empty code instead of 2.03 2022-11-03 23:33:57 +01:00
Benjamin Valentin
084f0287a3 nanocoap_sock: support handling empty ACKs with separate response 2022-11-03 23:26:51 +01:00
benpicco
0284aa5146
Merge pull request #18819 from benpicco/nanocoap_sock-non-retrans
nanocoap_sock: only re-transmit CON messages
2022-11-03 23:10:25 +01:00
Benjamin Valentin
63c9dde3a4 nanocoap_sock: don't store entire sock in coap_block_request_t 2022-11-01 00:17:11 +01:00
Benjamin Valentin
3877a92ca4 nanocoap_vfs: don't close socket in nanocoap_vfs_put() 2022-10-31 23:51:08 +01:00
Benjamin Valentin
782910ade4 nanocoap_sock: only re-transmit CON messages
If a NON confirmable message is sent with a callback function,
not receiving a response in time would lead to a retransmission.

This is of course an error, as only CON messages are to be retransmitted.
2022-10-31 17:18:19 +01:00
Marian Buschsieweke
d704a1a805
Merge pull request #18822 from jue89/feature/at86rf2xx_ztimer
drivers/at86rf2xx: migrate to ztimer
2022-10-31 15:44:53 +01:00
Jue
0dc054cbda sys/net/gnrc_lwmac: add missing xtimer dependency 2022-10-29 21:04:28 +02:00
Martine Lenders
36a099e1ec
gnrc_sixlowpan_iphc.c: dereference ipv6_hdr in DEBUG() after assignment 2022-10-29 00:58:35 +02:00
Felix
aa27ed71fa
gnrc_sixlowpan_frag_vrb: Assert no usage of a vrb with src_len == 0 2022-10-29 00:58:35 +02:00
Felix
17c70f7ee0
gnrc_netif_ieee802154: Ignore packets without source address 2022-10-29 00:58:35 +02:00
Felix
0bec3e245e
ieee802154: Adjust parsing of IEEE 802.15.4 frame header 2022-10-29 00:58:35 +02:00
Martine Lenders
4a081f8661
gnrc_sixlowpan_iphc: fix packet type confusion in _iphc_encode() 2022-10-29 00:58:34 +02:00
Felix
639c04325d
gnrc_sixlowpan_iphc: fix null pointer dereference in _iphc_encode() 2022-10-29 00:58:34 +02:00
Martine Lenders
9728f727e7
gnrc_sixlowpan_frag_rb: fix integer underflow in _6lo_frag_size() 2022-10-29 00:58:34 +02:00
Martine Lenders
2709fbd827
gnrc_sixlowpan_iphc: fix integer underflow in gnrc_sixlowpan_iphc_recv() 2022-10-29 00:58:33 +02:00
Martine Lenders
73615161c0
gnrc_sixlowpan_iphc: fix buffer overflow in gnrc_sixlowpan_iphc_recv() 2022-10-29 00:58:14 +02:00
Benjamin Valentin
55e13a9d61 nanocoap: add coap_request_ctx_init() 2022-10-28 15:24:23 +02:00
Benjamin Valentin
c6f9654461 nanocoap: request context to coap_handle_req() 2022-10-28 14:21:52 +02:00
Martine Lenders
9ae66beedf
Merge pull request #16156 from miri64/gnrc_sixlowpan_frag_sfr/feat/congure
gnrc_sixlowpan_frag_sfr: provide CongURE support
2022-10-27 15:01:07 +02:00
benpicco
4ebece5d34
Merge pull request #18801 from benpicco/gnrc_nib_full-debug
gnrc_ipv6_nib: add debug output when nib is full on address resolution
2022-10-27 12:49:29 +02:00
Martine Lenders
ff884dd45f
Merge pull request #17429 from benpicco/gnrc/ipv6_auto_subnets-static
gnrc/ipv6_auto_subnets: add CONFIG_GNRC_IPV6_AUTO_SUBNETS_STATIC option
2022-10-26 14:57:40 +02:00
Benjamin Valentin
b068bd31c2 gnrc/ipv6_auto_subnets: add CONFIG_GNRC_IPV6_AUTO_SUBNETS_STATIC option
In situations with high packet loss, if all sync packets are lost, conflicting
subnets will be configured.

If the network is static, this can be prevented by always using the highest number
of subnets that has been observed.

This assumes no nodes are physically added / removed from the network.
2022-10-25 19:46:42 +02:00
Martine Lenders
b92e90f7b5
gnrc_sixlowpan_frag_sfr: make ARQ timer mockable 2022-10-25 18:38:37 +02:00
Martine Lenders
30f990f789
gnrc_sixlowpan_frag_sfr: provide CongURE support 2022-10-25 18:38:36 +02:00
Benjamin Valentin
fa4fb8e3bf gnrc_ipv6_nib: add debug output when nib is full on address resolution 2022-10-25 18:21:57 +02:00
Martine Lenders
d759d2d18b
Merge pull request #18772 from namib-project/accept-helper
sys/net/nanocoap: introduce Accept option helper
2022-10-20 04:13:33 +02:00
Jan Romann
d916b33bc6 sys/net/nanocoap: introduce Accept option helper 2022-10-19 16:44:13 +02:00
Hendrik van Essen
226dce01bf examples/gcoap: add IPv4 support 2022-10-18 10:59:43 +02:00
benpicco
72d16e152a
Merge pull request #17983 from kfessel/p-remove-coap_pkt-token
net/nanocoap: remove coap_pkt token ptr
2022-10-16 04:21:47 +02:00
benpicco
4d0c533260
Merge pull request #18154 from benpicco/nanocoap_no-response
nanocoap: add support for no-response option
2022-10-15 21:16:00 +02:00
Martine Lenders
53ed211fc9
Merge pull request #16175 from miri64/gnrc_sixlowpan_frag_sfr/enh/mark-ecn
gnrc_sixlowpan_frag_sfr: add support for queue-based ECN
2022-10-15 14:01:44 +02:00
Martine Lenders
c94c32dce4
Merge pull request #18727 from miri64/gnrc/enh/explicit-pseudomodules
gnrc: make pseudo-modules explicit + documentation improvements
2022-10-14 17:39:39 +02:00
Marian Buschsieweke
5d5e8d6163
Merge pull request #18740 from maribu/chrysn-pull-requests/gnrc-netreg-lock
gnrc_netreg: Use locks around netreg
2022-10-14 15:10:35 +02:00
Leandro Lanzieri
70acefaa55
Merge pull request #18386 from miri64/gcoap_forward_proxy/enh/empty-ack
gcoap_forward_proxy: send empty ACK when response takes too long
2022-10-14 11:23:48 +02:00
chrysn
982ec4dcda
gnrc_netreg: Use locks around netreg
This eliminates race conditions around unregistering netdevs.

gnrc_netreg_lookup-style functions perform a DEVELHELP check on whether
that lock is held.
2022-10-14 03:35:15 +02:00
Benjamin Valentin
1cfcb307f2 nanocoap_sock: add nanocoap_sock_{put, post}_non() 2022-10-13 19:04:09 +02:00
Benjamin Valentin
56f36c09a0 nanocoap: add support for no-response option
See https://datatracker.ietf.org/doc/rfc7967/
2022-10-13 19:04:09 +02:00
Benjamin Valentin
c656df9c3a nanocoap_sock: implement nanocoap_sock_delete() 2022-10-13 18:56:28 +02:00
Marian Buschsieweke
b539d7ad6d
Merge pull request #17905 from benpicco/GNRC_NETIF_STACKSIZE_DEFAULT
gnrc_netif: don't allocate message queue on the stack
2022-10-13 17:10:43 +02:00
Martine Lenders
8dcc5d07ba
gnrc_sixlowpan_config: resolve ECN at the earliest convenience 2022-10-12 18:02:18 +02:00
Martine Lenders
653d08281b
gnrc_sixlowpan_frag_sfr: add support for queue-based ECN 2022-10-12 18:02:18 +02:00
Martine Lenders
63c4fe5770
gcoap: fix "line is longer than 100 characters" pointed out by Vera++ 2022-10-12 17:33:55 +02:00
chrysn
798dedd4d1
gcoap_forward_proxy: send empty ACK when response takes too long
Co-Authored-By: Martine S. Lenders <m.lenders@fu-berlin.de>
Signed-off-by: Martine Lenders <m.lenders@fu-berlin.de>
2022-10-12 17:33:55 +02:00
benpicco
913bf3748c
Merge pull request #18699 from miri64/gnrc_netif_lorawan/enh/up-down-support
gnrc_netif_lorawan: add support for LINK_UP/_DOWN events
2022-10-12 17:11:51 +02:00