1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys/include/net
bors[bot] b0626401d8
Merge #19331
19331: pkg/tinydtls: Adjust defaults r=miri64 a=chrysn

### Contribution description

This adjusts two defaults in tinydtls:

* Default verbosity is set to warning. At the info level, this module produces way more output (several lines per new connection, and even per message) than is common in RIOT.
* If gcoap is used, the buffer size is adjusted to the gcoap buffer size plus overhead. Otherwise, CoAP-over-DTLS works fine until one happens to request larger resources.

### Testing procedure

* Run examples/gcoap_dtls
* Send a CoAP request from outside, eg. with `aiocoap-client 'coaps://[fe80::3c63:beff:fe85:ca96%tapbr0]/.well-known/core' --credentials testserver.json` (where testserver.json is `{"coaps://[fe80::3c63:beff:fe85:ca96%tapbr0]/*": {"dtls": {"psk": {"ascii": "secretPSK"}, "client-identity": {"ascii": "Client_identity"}}}}`).

Before, there are messages shown for every request; now there are none.

Modify `examples/gcoap/server.c` as follows:

```patch
diff --git a/examples/gcoap/server.c b/examples/gcoap/server.c
index bf2315cd01..28e1faac27 100644
--- a/examples/gcoap/server.c
+++ b/examples/gcoap/server.c
`@@` -68,7 +68,7 `@@` static const coap_resource_t _resources[] = {
 };
 
 static const char *_link_params[] = {
-    ";ct=0;rt=\"count\";obs",
+    ";ct=0;rt=\"count\";obs;looooooooooooooooooooooong-attribute=\"loooooooooooooooooooooooooooooong\"",
     NULL
 };
```

The request passes; without this patch, it is stuck in retransmissions until "Network error: Retransmissions exceeded".

### Issues/PRs references

This contributes to making #19289 usable with a minimum level of security. (That module fills up the gcoap buffer to the brim). While the module handles the verbosity as well as it can (occasionally admitting that it lost bytes of output), the previous verbosity produces an infinite stream of stdout data. (But the default should be quiet immaterial of that particular PR).

Co-authored-by: chrysn <chrysn@fsfe.org>
2023-03-02 15:40:31 +00:00
..
bluetil
cord net/cord doc: Expand CONFIG_CORD_EXTRAARGS documentation 2022-01-27 09:50:08 +01:00
dhcpv6 sys/net/dhcpv6: let dhcpv6_client_req_ia_pd() return error 2023-02-01 23:25:22 +01:00
dns includes/net: replace "kernel_defines.h" 2022-11-22 13:39:35 +01:00
ethernet treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
fib
gcoap Merge #18414 2023-01-16 22:23:46 +00:00
gnrc gnrc_sixlowpan_frag_sfr_congure: add congure_abe support 2023-03-01 20:23:32 +01:00
iana
ieee802154 ieee802154/radio: fix blocking cca function 2023-01-17 11:30:59 +01:00
ipv4 treewide: fix typos found by recent codespell 2022-11-24 14:53:48 +01:00
ipv6 sys/net/ipv6: add ipv6_prefix_from_str() 2022-12-11 23:34:09 +01:00
lorawan gnrc/lorawan: add support for GNRC LoRaWAN 1.1 2022-09-29 11:25:56 +02:00
nanocoap nanocoap_link_format: add helper function to parse link format 2022-12-11 23:39:47 +01:00
netstats
ppp treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
rpl sys/net/gnrc/rpl: refactor netstats_rpl_t 2022-06-30 09:48:45 +02:00
sixlowpan nib/_nib-6ln: correct ABR timeout in ABRO 2022-09-29 10:48:49 +02:00
skald net/ble/skald: let itvl be configured per context 2022-05-24 13:02:10 +02:00
sock sys/net/sock_util: add sock_dtls_establish_session() 2023-02-08 15:57:22 +01:00
af.h sys/include/net/af: fix doc comment 2022-04-14 09:23:27 +02:00
arp.h
asymcute.h sys/asymcute: remove deprecated CONFIG_ASYMCUTE_BUFSIZE_EXP 2022-01-07 11:28:11 +01:00
ble.h
coap.h nanocoap_sock: implement DTLS socket 2023-01-13 00:17:32 +01:00
credman.h includes/net: replace "kernel_defines.h" 2022-11-22 13:39:35 +01:00
csma_sender.h treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
dhcpv6.h doc: fix unbalaced grouping 2022-09-14 15:05:25 +02:00
dns_mock.h sys/net/application_layer/sock_dns_mock: add module for mocking sock_dns 2022-04-03 17:29:10 +02:00
dns.h sys/dns: select appropriate address family if AF_UNSPEC 2022-12-07 22:26:51 +01:00
dsm.h dsm: make CONFIG_DSM_PEER_MAX depend on CONFIG_DTLS_PEER_MAX 2021-10-08 12:15:53 +02:00
dtls.h dtls, tinydtls: Raise default number of connections 2023-03-02 09:16:22 +01:00
eddystone.h
emcute.h
ethernet.h treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
ethertype.h treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
eui48.h
eui64.h
eui_provider.h
fib.h fib: document unused state 2023-02-22 16:47:14 +01:00
gcoap.h doc/gcoap: Update ToDo item referencing abandoned document 2023-02-21 20:22:46 +01:00
gnrc.h net/gnrc: Fixing whitespace in the documentation 2022-04-29 14:19:25 +02:00
icmp.h treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
icmpv6.h
ieee802154_security.h sys/include: remove kernel_defines.h where not needed 2022-11-22 13:39:35 +01:00
ieee802154.h net/ieee802154: add option for default ack request 2022-12-14 16:29:01 +01:00
inet_csum.h
ipv4.h treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
ipv6.h treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
l2filter.h
l2util.h treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
lora.h includes/net: replace "kernel_defines.h" 2022-11-22 13:39:35 +01:00
loramac.h includes/net: replace "kernel_defines.h" 2022-11-22 13:39:35 +01:00
mqttsn.h
nanocoap_sock.h nanocoap_sock: make use of sock_dtls_establish_session() 2023-02-08 15:57:28 +01:00
nanocoap_vfs.h nanocoap_vfs: add nanocoap_vfs_put() 2022-06-08 17:19:03 +02:00
nanocoap.h nanocoap: turn coap_szx2size() into a macro 2022-12-13 00:27:45 +01:00
ndp.h
netdev_test.h
netif.h sys/net/netif: add helpers for IPv6 addresses 2022-06-06 20:46:48 +02:00
netopt.h gnrc/lorawan: add support for GNRC LoRaWAN 1.1 2022-09-29 11:25:56 +02:00
netstats.h
ntp_packet.h
packet.h
ppptype.h treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
protnum.h treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
sixlowpan.h
skald.h net/ble/skald: let itvl be configured per context 2022-05-24 13:02:10 +02:00
sntp.h
sock.h gnrc_sock_udp: accept response from any address if remote is multicast 2022-11-15 11:26:31 +01:00
someip.h doc: fix unbalaced grouping 2022-09-14 15:05:25 +02:00
tcp.h
telnet.h doc: sort all stdio implementations into sys_stdio group 2023-01-13 11:08:22 +01:00
udp.h
uhcp.h
utils.h sys/net/netutils: add netutils_get_ipv4() 2022-03-08 13:35:32 +01:00
zep.h