1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/sys/net
Marian Buschsieweke 765dc3a299
sys/net/gcoap: reduce insanity of hack
gcoap contains a hack where a `coap_pkt_t` is pulled out of thin air,
parts of the members are left uninitialized and a function is called on
that mostly uninitialized data while crossing fingers hard that the
result will be correct. (With the current implementation of the used
function this hack does actually work.)

Estimated level of insanity: 😱😱😱😱😱

This adds to insane functions to get the length of a token and the
length of a header of a CoAP packet while crossing fingers hard that
the packet is valid and that the functions do not overread.

Estimated level of insanity: 😱😱😱

The newly introduced insane functions are used to replace the old
insane hack, resulting in an estimated reduction of insanity of 😱😱.

Side note: This actually does fix a bug, as the old code did not take
           into account the length of the extended TKL field in case of
           RFC 8974 being used. But that is a bug in the abused API,
           and not in the caller abusing the API.
2024-11-01 16:32:59 +01:00
..
application_layer sys/net/gcoap: reduce insanity of hack 2024-11-01 16:32:59 +01:00
ble bluetil: Ensure advertisement length does not exceed pkt len 2024-10-01 14:49:09 +02:00
credman *Kconfig*: Modify Kconfig to remove dep model 2024-03-27 10:28:12 +01:00
crosslayer *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
dsm sys/net/dsm: add missing dependencies 2022-02-21 15:15:02 +01:00
gnrc Merge pull request #20834 from derMihai/mir/nib/drop_for_unreachable_rebase 2024-10-16 09:16:40 +00:00
link_layer *Kconfig*: Modify Kconfig to remove dep model 2024-03-27 10:28:12 +01:00
lora *Kconfig*: Modify Kconfig to remove dep model 2024-03-27 10:28:12 +01:00
netdev_test netdev_test: avoid explicit cast to netdev 2021-07-09 11:35:19 +02:00
netif *Kconfig*: Modify Kconfig to remove dep model 2024-03-27 10:28:12 +01:00
netstats sys/include/net/netstats: move xtimer header where it is needed 2021-02-16 18:18:21 +01:00
netutils net/util: make use of dns_query() 2022-07-29 17:48:26 +02:00
network_layer *Kconfig*: Remove dep-only Kconfig files 2024-03-26 14:54:22 +01:00
sock *Kconfig*: Modify Kconfig to remove dep model 2024-03-27 10:28:12 +01:00
transport_layer sys: fix doxygen grouping 2018-06-11 19:12:02 +02:00
doc.txt doc: add net to sys group 2015-08-30 14:00:33 +02:00
ieee802154.txt doc: Link to thread primer 2024-02-14 17:44:13 +01:00
Kconfig *Kconfig*: Modify Kconfig to remove dep model 2024-03-27 10:28:12 +01:00