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

10760 Commits

Author SHA1 Message Date
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
Marian Buschsieweke
978176a283
Merge pull request #20074 from maribu/sys/flash_utils/avr
sys/flash_utils: Minor bug fixes
2023-11-11 12:58:08 +00:00
benpicco
5d54e89a17
Merge pull request #20078 from benpicco/mtd_dev_get
drivers/mtd: rename mtd_default_get_dev() -> mtd_dev_get()
2023-11-10 21:36:19 +00:00
Benjamin Valentin
c2f93c05f1 treewide: mtd_default_get_dev() -> mtd_dev_get() 2023-11-10 19:53:48 +01:00
Benjamin Valentin
75f10a5725 gnrc/ipv6/nib: don't do multicast neighbor solicitation on 6LoWPAN 2023-11-10 12:11:49 +01:00
Marian Buschsieweke
d6797867fb
sys/flash_utils: Fix signature in documentation
The function signature in the Doxygen generated doc was incorrect.
Given that the implementation does have the correct signature, the
impact may not be that large. Still, incorrect doc is confusing, so
let's fix it.
2023-11-10 11:17:51 +01:00
Benjamin Valentin
f731ec7bff sys/malloc_tracing: fix calloc printouts 2023-11-09 20:15:53 +01:00
bors[bot]
c0ae75b339
Merge #20003 #20028 #20036 #20041
20003: coap: create typedef for CoAP methods r=benpicco a=benpicco



20028: nanocoap: fix incorrect uses of coap_get_code() r=benpicco a=benpicco



20036: boards/nucleo-l4r5zi : add PWM configuration r=benpicco a=krzysztof-cabaj

### Contribution description

This PR adds to the Nucleo-l4r5zi PWM configuration

### Testing procedure

Flash the board using `tests/periph/pwm` program. Check if you could, for example, change LED 
intensity using PWM. 

### Issues/PRs references

None.

20041: pkg/littlefs2: bump to v2.8.1 r=benpicco a=bergzand

### Contribution description

Minor version number bump.

### Testing procedure

- Check if I copied the correct commit hash.
- Run the tests.


### Issues/PRs references

None

Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: krzysztof-cabaj <kcabaj@gmail.com>
Co-authored-by: Koen Zandberg <koen@bergzand.net>
2023-11-02 11:01:23 +00: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
Benjamin Valentin
db3294a481 nanocoap_sock: make use of coap_method_t 2023-10-26 11:37:14 +02:00
Benjamin Valentin
1e854ec187 coap: create typedef for CoAP methods 2023-10-26 11:37:14 +02:00
Martine Lenders
63fd5643e4
coap: Set COAP_FORMAT_DNS_MESSAGE to 553
Set since draft-ietf-core-dns-over-coap-03
2023-10-25 11:00:56 +02:00
Martine Lenders
410be58f36
gcoap_dns: Update draft URL
The DoC draft is a working group draft since September 2022
2023-10-25 10:54:31 +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
bors[bot]
a1e19312a3
Merge #19990
19990: sys/psa_crypto: allow repeated initialization r=benpicco a=mguetschow

### Contribution description

- simple unit test which calls `psa_crypto_init()` twice
- fix to no re-initialize key slots (which left them in a broken state)

### Testing procedure

- `make -C tests/sys/psa_crypto all test` succeeds
- `git checkout HEAD~1 && make -C tests/sys/psa_crypto all test` fails



Co-authored-by: Mikolai Gütschow <mikolai.guetschow@tu-dresden.de>
2023-10-23 16:32:14 +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
bors[bot]
03d3874e51
Merge #19465 #19981 #19995
19465: drivers/mtd: use XFA for pointers to defined MTDs r=benpicco a=gschorcht

### Contribution description

This PR provides the support to hold pointers to defined MTDs within a XFA. The XFA allows
- to access MTDs of different types (`mtd_flashpage`, `mtd_sdcard`, `mtd_emulated`, ...) by an index
- to determine the number of MTDs defined in the system.

### Testing procedure

To be defined once PR #19443 is merged because emulated MTDs will allow to test this PR on arbitrary boards.

### Porting Guide

For external boards:
 - remove the `MTD_NUMOF` definition from `board.h`
 - add `MTD_XFA_ADD(<mtd_dev>, <idx>);` to the definition of `<mtd_dev>`.
 - `MTD_0`, `MTD_1`, … defines are no longer needed.

### Issues/PRs references

 Related to PR #19443

19981: Fletcher32: Add incremental API r=benpicco a=bergzand

### Contribution description

This PR extends the current fletcher32 checksum with an incremental API mode. This way the bytes to be checksummed can be supplied via multiple successive calls and do not have to be provided in a single consecutive buffer.

I've also rephrased the warning with the original function a bit as that function uses an `unaligned_get_u16` to access the data. The data thus does not require alignment, but the length does need to be supplied as number of 16 bit words.

### Testing procedure

The test has been extended


### Issues/PRs references

None

19995: sys/psa_crypto: Fix macro for public key max size and SE example r=benpicco a=Einhornhool

### Contribution description
#### 1. Wrong public key size when using secure elements, introduced by  #19954
Fixed conditions for key size macros in `crypto_sizes.h`.

#### 2. EdDSA and ECDSA examples fail when using a secure element because of unsopported changes introduced by #19954
Updated `example/psa_crypto` to use only supported functions for secure elements.

### Testing procedure
Build `example/psa_crypto` for secure elements and run application

Output on master:
```
2023-10-19 14:33:24,372 # main(): This is RIOT! (Version: 2019.07-devel-22378-gb6772)
2023-10-19 14:33:24,372 # HMAC SHA256 took 56393 us
2023-10-19 14:33:24,372 # Cipher AES 128 took 68826 us
2023-10-19 14:33:24,372 # *** RIOT kernel panic:
2023-10-19 14:33:24,373 # HARD FAULT HANDLER
2023-10-19 14:33:24,373 # 
2023-10-19 14:33:24,373 # *** rebooting...

```
Output with fixes:
```
2023-10-19 13:35:24,715 # main(): This is RIOT! (Version: 2019.07-devel-22384-g8ef66-dev/psa-crypto-fixes)
2023-10-19 13:35:24,715 # HMAC SHA256 took 56374 us
2023-10-19 13:35:24,715 # Cipher AES 128 took 68805 us
2023-10-19 13:35:24,715 # ECDSA took 281164 us
2023-10-19 13:35:24,715 # All Done
```


Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
Co-authored-by: Koen Zandberg <koen@bergzand.net>
Co-authored-by: Lena Boeckmann <lena.boeckmann@haw-hamburg.de>
2023-10-19 19:01:12 +00:00
Lena Boeckmann
130420258c sys/psa_crypto: Fix conditions for public key max export size 2023-10-19 14:12:14 +02:00
Mikolai Gütschow
25aa2167f6
sys/psa_crypto: allow repeated calls to psa_crypto_init()
as defined per https://armmbed.github.io/mbed-crypto/html/api/library/library.html?highlight=psa_crypto_init#c.psa_crypto_init
2023-10-19 11:21:08 +02:00
Mikolai Gütschow
6ad2f052c5
sys/psa_crypto: remove unused variable 2023-10-19 11:21:03 +02:00
a00702ee65
Fletcher32: Rephrase note on 16 bit word operations 2023-10-18 13:22:44 +02:00
31df2ba0aa
Fletcher32: Add incremental API 2023-10-18 13:22:44 +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
bors[bot]
3a4ec8d21e
Merge #19972
19972: RFC: Support enabling/disabling lwIP netifs from gnrc_netif shell r=miri64 a=yarrick



Co-authored-by: Erik Ekman <eekman@google.com>
2023-10-12 14:27:46 +00: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
ee6ca2b6ce sys/shell/gnrc_netif: Use l2util versions of link addr helpers
To avoid dependency on gnrc files.
As suggested in #16965
2023-10-12 10:23:24 +02:00
bors[bot]
715da20ad6
Merge #19973
19973: sys/shell/gnrc_txtsnd: Move to separate module r=yarrick a=yarrick



Co-authored-by: Erik Ekman <eekman@google.com>
2023-10-12 08:20:25 +00:00
Erik Ekman
ea545d2028 sys/shell/gnrc_txtsnd: Move to separate module 2023-10-11 22:55:37 +02:00
bors[bot]
357e4063a1
Merge #19970
19970: sys/shell/gnrc_netif: fix ifconfig set language issue r=yarrick a=krzysztof-cabaj

### Contribution description

This PR fix some language issues in the output of `ifconfig set`.

### Testing procedure

Compile any program with `gnrc_netif` module, for example `examples/gcoap`. 
Compare last line of presented outputs.

Output of `ifconfig help` without this PR.

```
All up, running the shell now
> ifconfig help
ifconfig help
usage: ifconfig help
usage: ifconfig <if_id> [up|down]
usage: ifconfig <if_id> set <key> <value>
      Sets an hardware specific specific value
```

Output of `ifconfig help` with this PR.

```
All up, running the shell now
> ifconfig help
ifconfig help
usage: ifconfig
usage: ifconfig help
usage: ifconfig <if_id> [up|down]
usage: ifconfig <if_id> set <key> <value>
      Sets a hardware specific value
```

### Issues/PRs references
None

Co-authored-by: krzysztof-cabaj <kcabaj@gmail.com>
2023-10-11 20:19:12 +00:00
Benjamin Valentin
7a66f1cc42 sys/event/timeout: add event_timeout_is_pending() 2023-10-11 22:02:08 +02:00
Erik Ekman
726e2eb045 sys/shell/gnrc_netif: Set lwIP netif state on up/down 2023-10-11 21:46:55 +02:00
Erik Ekman
0fc7898b34 sys/shell/gnrc_netif: Show interface up/down state 2023-10-11 21:46:55 +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
Erik Ekman
28b8536063 sys/shell/gnrc_netif: print v6 addresses based on ipv6 module
To support lwIP better (dont require gnrc_ipv6)

Also don't require IPv6 for printing link type

With this sc_gnrc_netif can compile and work when using lwIP
(with l2util module added):

```
> ifconfig
Iface  ET1  HWaddr: 24:0A:C4:E6:0E:9C  Channel: 6  Link: up
          L2-PDU:1500  Source address length: 6
          Link type: wireless
          inet6 addr: fe80::260a:c4ff:fee6:e9c  scope: link
          inet6 addr: 2001:db8::260a:c4ff:fee6:e9c  scope: global

Iface  ET0  HWaddr: 24:0A:C4:E6:0E:9F  Link: up
          L2-PDU:1500  Source address length: 6
          Link type: wired
          inet6 addr: fe80::260a:c4ff:fee6:e9f  scope: link
          inet6 addr: 2001:db8::260a:c4ff:fee6:e9f  scope: global

>
```

Still works in gnrc_networking example:

```
> ifconfig
Iface  8  HWaddr: 24:0A:C4:E6:0E:9F  Link: up
          L2-PDU:1500  MTU:1500  HL:64  RTR
          RTR_ADV
          Source address length: 6
          Link type: wired
          inet6 addr: fe80::260a:c4ff:fee6:e9f  scope: link  VAL
          inet6 group: ff02::2
          inet6 group: ff02::1
          inet6 group: ff02::1:ffe6:e9f
          inet6 group: ff02::1a
```
2023-10-11 19:56:33 +02:00
bors[bot]
7bc783e7af
Merge #19966
19966: sys/event: add event_is_queued() r=benpicco a=fabian18



Co-authored-by: Fabian Hüßler <fabian.huessler@ml-pa.com>
2023-10-11 12:18:43 +00:00
Martine Lenders
8d1cb1bd2b
gcoap: fix underflow when correcting ETag from cache 2023-10-10 14:41:45 +02:00
Mikolai Gütschow
335c4f8c0c
sys/psa_crypto: fix PSA signing macros
guarding {sign,verify}_{hash,message} functions

see 72718dd87e/include/psa/crypto_values.h\#L1678
2023-10-09 10:21:45 +02:00
Mikolai Gütschow
963775bdd9
sys/psa_crypto: add support for Ed25519 (EdDSA) 2023-10-09 10:21:44 +02:00
krzysztof-cabaj
ce9c8830ec sys/shell/gnrc_netif: fix ifconfig set language issue 2023-10-06 14:41:43 -04:00
Fabian Hüßler
3047bef039 sys/event: add event_is_queued() 2023-10-06 18:21:34 +02:00
Gunar Schorcht
a783a159af sys/usbus/msc: use MTD pointers in XFA for LUN handling 2023-10-02 12:28:08 +02:00
bors[bot]
1ac169351b
Merge #19961
19961: ztimer_periodic: fix example in documentation r=benpicco a=benpicco



Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2023-09-29 20:48:07 +00:00
Benjamin Valentin
278d2c781c ztimer_periodic: fix example in documentation 2023-09-29 18:27:43 +02:00