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

4552 Commits

Author SHA1 Message Date
Benjamin Valentin
d4a3521501 doc/doxygen: add gnrc_ipv6_auto_subnets.c to INPUT 2022-07-15 11:47:01 +02:00
Benjamin Valentin
c7ac22c892 gnrc/ipv6_auto_subnets: improve wording in documentation 2022-07-15 01:50:15 +02:00
Benjamin Valentin
d09d29a581 tests/unittests: add tests sock_dns_cache 2022-07-15 00:03:49 +02:00
Benjamin Valentin
077a41a719 sock_dns: implement DNS cache 2022-07-13 23:23:52 +02:00
Martine Lenders
a8254d52b8
Merge pull request #16705 from miri64/gcoap_dns/feat/initial
gcoap_dns: initial import of a DNS over CoAP (DoC) client
2022-07-13 02:27:17 +02:00
Martine Lenders
11dc836d61
Merge pull request #18307 from nmeum/pr/gnrc_dhcpv6_client_parse_reply
gnrc_dhcpv6_client: Fix out-of-bounds access during option parsing
2022-07-12 19:30:50 +02:00
benpicco
2198eb84c0
Merge pull request #18284 from jia200x/pr/gnrc_netif_move_tested_options
gnrc_netif: move `option_tested` to default init function
2022-07-11 22:57:57 +02:00
Sören Tempel
f073dcdb3d gnrc_dhcpv6_client: Fix out-of-bounds access during option parsing
The _parse_reply function iterates over the DHCPv6 message options
twice but only performs sanity checks on the option length in the
first iteration. As such, both loop iterations need to be identical.
Unfortunately, there aren't without this commit as (1) they use
different maximum length values and (2) the first iteration stops
parsing as soon as it encounters a zero option while the second
doesn't. As such, it is possible for out-of-bounds read to be
performed by the second loop iteration. This commit fixes this.
2022-07-11 22:55:33 +02:00
Leandro Lanzieri
4a3231f763
drivers/kw2xrf: add setup function with global index
This index is used to register the network device.
2022-07-11 09:24:59 +02:00
Martine Lenders
107a2a0753
gcoap_dns: initial import of a DNS over CoAP client 2022-07-01 18:44:02 +02:00
Sören Tempel
4dcb8edcc8 asymcute: Fix deadlocks in REGACK, SUBACK and UNSUBACK handler
The handlers for these MQTT message lock the connection mutex on
function entry. During automated testing of asymcute, I discovered
return paths for these function which do not unlock the connection
mutex. This results in a deadlock which prevents asymcute from
sending any further messages.
2022-07-01 00:55:07 +02:00
Martine Lenders
fda230eb7c
Merge pull request #18275 from maribu/sys/net/rpl/netstats
sys/net/gnrc/rpl: sync access to netstats
2022-07-01 12:24:24 +02:00
Marian Buschsieweke
5a47d6a9b8
sys/net/gnrc/rpl: sync access to netstats
Synchronize the RPL thread updating the RPL netstats with the RPL
shell command reading it by disabling IRQs. This will prevent printing
corrupted data on non-32bit platforms as well as printing inconsistent
data (e.g. TX count of old state in conjunction with TX bytes of new
state) for all platforms.

Co-authored-by: Martine Lenders <mail@martine-lenders.eu>
2022-06-30 09:48:46 +02:00
Marian Buschsieweke
93d8bade8e
sys/net/gnrc/rpl: refactor netstats_rpl_t
There is a repeating pattern in the struct that is split out into a
subtype in this commit. This makes handling the data easier, as now
done in the print routine.
2022-06-30 09:48:45 +02:00
Jose Alamos
2c76dbf351
gnrc_netif: move option_tested to default init function 2022-06-29 17:48:27 +02:00
Martine Lenders
d9846e414f
Merge pull request #18269 from maribu/sys/net/netstats
sys/net/netopt: change NETOPT_STATS semantics
2022-06-29 15:52:03 +02:00
Marian Buschsieweke
973b6f69bf
sys/net/netopt: change NETOPT_STATS semantics
Instead of retrieving a pointer with NETOPT_STATS, retrieve the current
data. This avoids data corruptions when reading from one thread (e.g.
the thread running the shell (ifconfig command)) while another thread
is updating it (e.g. the netif thread).

The issue affects all boards, as users typically expect the count of
TX packets and the number of TX bytes to refer to the same state. For
16 bit and 8 bit platforms even a single netstat entry can read back
corrupted.

This fixes the issue by just copying the whole netstat_t struct over
without requiring explicit locking on the user side. A multi-threaded
network stack still needs to synchronize the thread responding to
netopt_get with the thread writing to the netstat_t structure, but that
is an implementation detail no relevant to the user of the API.
2022-06-28 16:57:43 +02:00
benpicco
5bb12f3e57
Merge pull request #18264 from jia200x/pr/submac_use_ieee802154_retrans_config
ieee802154: add default max frame retransmissions config
2022-06-28 16:00:51 +02:00
Jose Alamos
88e14f01a1
ieee802154/submac: use default config for max frame retransmissions 2022-06-27 14:51:16 +02:00
Jose Alamos
0a76a88dc8
ieee802154: add default max frame retransmissions config 2022-06-27 14:50:54 +02:00
Benjamin Valentin
5b7d9be254 net/eui_provider: provide netif index to EUI provder function
An EUI provider can provide EUIs for multiple interfaces based on
their index.

For this is should get the index of the interface, not the index of
the EUI provider.
2022-06-23 22:30:24 +02:00
Benjamin Valentin
0b3f66f0db sys/net/gnrc_pktbuf_static: fix documentation of use-after-free detection 2022-06-23 00:31:32 +02:00
chrysn
5852167772
Merge pull request #18227 from benpicco/gnrc_pktbuf_static-use-after-free
sys/net/gnrc_pktbuf_static: add use-after-free detection
2022-06-22 21:28:28 +02:00
Benjamin Valentin
a165093b10 sys/net/gnrc_pktbuf_static: add use-after-free detection 2022-06-22 15:41:15 +02:00
Benjamin Valentin
8c4e5629d1 nanocoap_sock: fix debug output 2022-06-21 23:06:33 +02:00
Martine Lenders
03dfad899b
Merge pull request #17834 from haukepetersen/opt_skald_advitvlconfig
net/ble/skald: make advertising interval configurable per context
2022-06-21 13:31:57 +02:00
Benjamin Valentin
14afafa2d2 gnrc_pktbuf: fix gnrc_pktbuf_contains() 2022-06-17 19:58:01 +02:00
Benjamin Valentin
11e40a9d61 nanocoap_sock: fix wrong assertion
The assertion is a bit overeager.
In case of receiving a wrong message ID, we re-try receive without
entering the STATE_REQUEST_SEND state again, so it is expected that
we get a non-NULL ctx/response from sock_udp_recv_buf().

What this assert should actually check is that we don't get a non-NULL
ctx after calling sock_udp_recv_buf() with a non-NULL ctx.

So make this explicit to not falsely fail the assertion.
2022-06-16 18:54:16 +02:00
benpicco
0a16f8266a
Merge pull request #17962 from benpicco/nanocoap_vfs-put
nanocoap_vfs: add nanocoap_vfs_put()
2022-06-16 11:53:36 +02:00
benpicco
593b5d376d
Merge pull request #18186 from maribu/sys/fmt
sys/fmt: fix output on native
2022-06-11 08:07:22 +02:00
Marian Buschsieweke
85cf4aef03
sys/net/ipv6: fix ipv6_addrs_print()
Fix incorrect printing of the separator after the last item.
2022-06-10 11:02:42 +02:00
Benjamin Valentin
d102bf90ea gnrc/ipv6_auto_subnets: always send RIO to upstream network
In a881af8b08 we would return early if the subnet did not change,
but we must still send the router advertisement with the route information
option to the upstream network, otherwise hosts in that network will not
consider the downstream subnet off-link.
2022-06-09 17:25:20 +02:00
Benjamin Valentin
bb42f6a2f4 nanocoap_vfs: add nanocoap_vfs_put() 2022-06-08 17:19:03 +02:00
Benjamin Valentin
7029572ca7 sys/net/telnet: add telnet_server_disconnect() 2022-06-08 13:01:23 +02:00
Marian Buschsieweke
bfb8a55764
sys/net/netif: add helpers for IPv6 addresses
- add `netif_get_ipv6()` to query IPv6 (as a slim convenience wrapper
  for `netif_get_opt()`)
- add `netifs_get_ipv6()` to query IPv6 addresses of all netifs
- add `netif_print_ipv6()` to print the IPv6 address(es) of a single
  netif
- add `netifs_print_ipv6()` to print the IPv6 address(es) of all netifs
2022-06-06 20:46:48 +02:00
Marian Buschsieweke
a4d00df586
sys/net: add ipv6_addrs_print()
Also use `IS_USED(MODULE_FMT)` rather than the preprocessor and rely
on the optimizer to eliminate the dead branch.
2022-06-06 20:46:48 +02:00
Martine Lenders
18edd896c1
Merge pull request #18153 from benpicco/gnrc_netif_pktq-fix
gnrc_netif_pktq: protect against concurrent access
2022-06-01 22:00:29 +02:00
Benjamin Valentin
61cc168ce1 gnrc_netif_pktq: protect against concurrent access
fixes #17924
2022-06-01 12:13:31 +02:00
Martine Lenders
c4e202ae67
Merge pull request #17709 from benpicco/cpu/native-tap_wired
netdev_tap: make 'wired' property configurable
2022-06-01 02:24:43 +02:00
Martine Lenders
e22fb6ef07
gnrc_netif_pktq: create dedicated Kconfig
Reflects dependency change in e5f93f856d
2022-05-30 11:13:52 +02:00
Martine Lenders
e5f93f856d
gnrc: gnrc_netif etc. modules are not required by gnrc_netif_pktq 2022-05-30 10:39:06 +02:00
Benjamin Valentin
bf5926283b gnrc_netreg: drain mbox on unregister
If there are still messages in the mbox when gnrc_netreg_unregister()
is called, we must release the associated pktbuf snips, otherwise
they are leaked away forever.

E.g. `sock_udp_close()` was called without receiving all messages with
`sock_udp_recv()`.
2022-05-29 22:42:48 +02:00
benpicco
31b8518d20
Merge pull request #17965 from benpicco/coap_get_blockopt-uint8
nanocoap: use uint8_t for szx value
2022-05-25 14:00:04 +02:00
Martine Lenders
3e531801e6
Merge pull request #17678 from miri64/gnrc_netif/enh/optional-comp-ctx
gnrc_netif: make auto-config of compression context optional
2022-05-25 00:51:36 +02:00
Martine Lenders
a2ca69ac91
Merge pull request #17691 from miri64/gnrc_sock/enh/warn-about-async-timeout
gnrc_sock: warn about non-zero receive timeouts with sock_async
2022-05-24 23:20:42 +02:00
benpicco
85169fc220
Merge pull request #17937 from benpicco/nanocoap_vfs
nanocoap_vfs: add nanocoap_vfs_get()
2022-05-24 16:10:15 +02:00
Martine Lenders
a61c4b738c
Merge pull request #17547 from benpicco/gnrc_ipv6_auto_subnets-multi
gnrc/ipv6_auto_subnets: allow to join multiple subnets
2022-05-24 15:49:17 +02:00
Martine Lenders
4599c21b19
Merge pull request #18085 from benpicco/ipv6_auto_subnets-pio-flags
gnrc/ipv6_auto_subnets: only use prefixes meant for automatic address configuration
2022-05-24 14:23:53 +02:00
Hauke Petersen
f10a28a7f7 net/ble/skald: let itvl be configured per context 2022-05-24 13:02:10 +02:00
Martine Lenders
3d819ce707
gnrc_netif: make auto-config of compression context optional 2022-05-24 12:30:36 +02:00
Martine Lenders
4e88b7552b
gnrc_sock: warn about non-zero receive timeouts with sock_async 2022-05-24 12:29:13 +02:00
Benjamin Valentin
87359bb70a nanocoap_vfs: add nanocoap_vfs_get() 2022-05-24 09:32:57 +02:00
Martine Lenders
078bced8e1
Merge pull request #16090 from maribu/gnrc_tx_sync_frag_sfr
sys/net/gnrc: add gnrc_tx_sync for gnrc_sixlowpan_frag_sfr
2022-05-24 03:38:38 +02:00
Martine Lenders
a5cc629fb8
Merge pull request #18127 from benpicco/gnrc/nib-no_default_router_from_wpan
gnrc/nib: don't add routers from WPAN as default router on the 6LBR
2022-05-24 00:38:43 +02:00
Benjamin Valentin
c6ba5d9180 gcoap_fileserver: use uint8_t for szx value 2022-05-23 23:43:21 +02:00
Benjamin Valentin
00221818b6 nanocoap: use uint8_t for szx value
The value is an exponent, 8 bits totally suffice here
2022-05-23 23:41:21 +02:00
benpicco
08e430bee7
Merge pull request #17956 from benpicco/coapfileserver
gcoap: Add file server
2022-05-23 22:10:49 +02:00
Benjamin Valentin
f544890056 gnrc/nib: don't add routers from WPAN as default router for 6LBR
This avoids a race condition where the default router slots for the 6LBR
are used up by router advertisements from the 6Lo network that arrived
before router advertisements from the upstream network.

The border router should ignore 'default routers' from the 6Lo network as
it consitutes the uplink for that network.
2022-05-23 16:44:58 +02:00
Benjamin Valentin
fad65011b7 netdev_tap: make NETDEV_TAP_MAX an upper bound 2022-05-23 15:27:35 +02:00
Martine Lenders
3398898e76
gnrc_ipv6_nib: fix inconsistent ABR valid lifetime representation 2022-05-23 14:21:25 +02:00
chrysn
185dfea07f gcoap_fileserver: New module to serve VFS via CoAP 2022-05-22 16:36:21 +02:00
Benjamin Valentin
7c75852316 nanocoap_sock: clean up state management 2022-05-18 11:41:58 +02:00
benpicco
7c62c8983d
Merge pull request #17958 from benpicco/nanocoap-blockwise_put
nanocoap_sock: add nanocoap_sock_block_request()
2022-05-18 10:40:24 +02:00
Benjamin Valentin
b99d4b58bd nanocoap_sock: add nanocoap_sock_block_request() 2022-05-17 23:07:23 +02:00
Benjamin Valentin
f2279e43ae nanocoap_sock: support sending CoAP packet with payload snips 2022-05-17 23:07:23 +02:00
Marian Buschsieweke
e4098d4b0d
sys/net/gnrc: add gnrc_tx_sync for gnrc_sixlowpan_frag_sfr
Implement TX synchronization for gnrc_sixlowpan_frag_sfr
2022-05-17 14:01:57 +02:00
benpicco
d28a45e939
Merge pull request #18089 from benpicco/NETOPT_RX_END_IRQ
net/netopt: drop NETOPT_RX_END_IRQ
2022-05-16 11:34:48 +02:00
benpicco
1e315c7308
Merge pull request #16748 from jia200x/pr/gnrc_netif/remove_netdev_event_isr_msg
gnrc_netif: use event loops by default to process ISR
2022-05-13 18:49:01 +02:00
Martine Lenders
dbed2b48ea
nanocoap_cache: add helper function to check if entry is stale 2022-05-13 12:14:55 +02:00
Martine Lenders
310ed649ae
gcoap: reflect truncation with caching 2022-05-13 12:14:55 +02:00
Martine Lenders
70d0d7f624
gcoap_forward_proxy: only leave upstream validation for caching
Most of the caching operation was moved to the client code. Since the
forward proxy is using that code for upstream messaging, interacting
with the cache directly is not necessary anymore.

The only cache-related thing necessary for the proxy is validating ETags
from upstream. However, that can be done by just looking at the ETags
from the upstream response (which may or may not have come from the
cache).
2022-05-13 12:14:55 +02:00
Martine Lenders
728c7d6088
gcoap: add nanocoap_cache support for clients 2022-05-13 12:14:54 +02:00
Martine Lenders
cbbde07cc6
gcoap: add helper function to get request header from a request memo 2022-05-12 15:22:05 +02:00
Martine Lenders
73bcd83543
nanocoap_cache, forward_proxy: add ETag validation support 2022-05-12 13:22:41 +02:00
Benjamin Valentin
b13b942e18 gnrc/ipv6_auto_subnets: allow to join multiple subnets 2022-05-12 00:44:18 +02:00
Benjamin Valentin
aae9bb0a91 net/netopt: remove NETOPT_RX_END_IRQ 2022-05-11 23:44:24 +02:00
Benjamin Valentin
83d7d05885 gnrc/link_layer: don't set NETOPT_RX_END_IRQ 2022-05-11 13:58:06 +02:00
Benjamin Valentin
03a669c407 gnrc_netif: remove warning about NETOPT_RX_END_IRQ 2022-05-11 13:56:47 +02:00
Cenk Gündoğan
c5eb53095d
gcoap: integrate nanocoap cache 2022-05-10 18:43:57 +02:00
Cenk Gündoğan
8750605d26
nanocoap: add cache for response messages 2022-05-10 18:43:56 +02:00
Jose Alamos
869c5f37a7 link_layer/lwmac: use event queue for ISR offload 2022-05-10 17:48:43 +02:00
Jose Alamos
6040747f33 link_layer/gomach: use event queue for ISR offload 2022-05-10 17:48:43 +02:00
Jose Alamos
081dfe0e64 gnrc_netif: use event queue for ISR offload 2022-05-10 17:48:42 +02:00
Jose Alamos
38798cb877 gnrc_netif: use events instead of msg queue for ISR offload 2022-05-10 17:48:42 +02:00
Benjamin Valentin
1c1cb481da gnrc/ipv6_auto_subnets: only use prefix meant for address configuration 2022-05-10 16:41:20 +02:00
Marian Buschsieweke
eadd282cf4
Merge pull request #18026 from benpicco/gcoap_add_fix
gcoap: ensure response address is the same as request address
2022-05-10 10:49:56 +02:00
Marian Buschsieweke
3dad6740da
Merge pull request #17990 from benpicco/nanocoap-void
nanocoap: use void * for payload bytes
2022-05-10 10:49:05 +02:00
Benjamin Valentin
e621afb2dc gcoap: ensure response address is the same as request address
If a node has multiple addresses we must reply to a request with the
same address on which the request was received.
2022-05-10 09:24:56 +02:00
Benjamin Valentin
cc8b4f52aa grnc_sock_udp: implement SOCK_AUX_SET_LOCAL 2022-05-10 09:24:56 +02:00
Benjamin Valentin
2197f9c16a grnc_sock_ip: implement SOCK_AUX_SET_LOCAL 2022-05-10 09:24:56 +02:00
Benjamin Valentin
cbd48c23aa gnrc_sock: implicitly set netif if there is only a single one 2022-05-06 12:11:13 +02:00
benpicco
de23ba0d04
Merge pull request #18046 from benpicco/nanocoap-minor
nanocoap: minor fixes
2022-05-05 14:56:47 +02:00
Benjamin Valentin
0847c18a18 nanocoap: use size_t for payload_len 2022-05-03 11:32:20 +02:00
Benjamin Valentin
cabb2c912d nanocoap: use void * for payload bytes 2022-05-03 11:32:20 +02:00
Benjamin Valentin
d03c6390c8 nanocoap_sock: release rx buffer on RESET
We must not return without calling sock_udp_recv_buf() again.
2022-05-03 03:53:56 +02:00
Benjamin Valentin
e55f0f8831 sys/net/grnc: make use of iolist_to_buffer() 2022-05-02 23:23:52 +02:00
benpicco
1b92fb9858
Merge pull request #17350 from benpicco/gnrc_rpl/auto_init_on_prefix
gnrc/ipv6_auto_subnets: init RPL root when adding a prefix
2022-05-02 21:38:21 +02:00
Benjamin Valentin
a881af8b08 gnrc/ipv6_auto_subnets: bail out early if prefix stays the same 2022-05-01 21:37:32 +02:00
Benjamin Valentin
5785856fe7 gnrc/ipv6_auto_subnets: bail out early if adding prefix fails 2022-04-29 22:56:35 +02:00
Benjamin Valentin
3993fd75d0 gnrc/ipv6_auto_subnets: auto init RPL root 2022-04-29 22:56:35 +02:00
Benjamin Valentin
04a8a36734 nanocoap_sock: only abort nanocoap_sock_get_blockwise() on negative error
Some user callbacks might just return the result of some other operation
that returns written bytes or negative error.

Let's not break those, only consider negative callback returns an error.
2022-04-29 21:29:36 +02:00
eecac6945b nanocoap: Add handler for resource-based subtrees
This adds a coap_handler_t function that can be used to parse new
subtrees. The subtree information is included in the context pointer of
the call and must be of type coap_resource_subtree_t. This object then
contains the pointer and length of a different coap_resource_t instance.
2022-04-23 10:12:18 +02:00
Benjamin Valentin
bb4c597681 nanocoap_sock: document (ab)use of sock_udp_recv_buf(), add asssert() 2022-04-22 11:34:19 +02:00
Benjamin Valentin
b20f89976d nanocoap_sock: pass on error code from user callback 2022-04-22 10:35:52 +02:00
Benjamin Valentin
85833ab58c nanocoap_sock: clean up the request function 2022-04-22 10:35:52 +02:00
Benjamin Valentin
bd7fe3bc5c nanocoap_sock: calculate deadline from interval
So we don't have to wait a full interval again if we got a wrong
message without resend.
2022-04-22 10:35:52 +02:00
Benjamin Valentin
e2fe9d0268 nanocoap_sock: compare response token 2022-04-22 10:35:52 +02:00
Benjamin Valentin
c22b1242ae nanocoap_sock: ensure ctx is reset before receiving new frame 2022-04-22 10:35:52 +02:00
Benjamin Valentin
3ac258ccdf nanocoap_sock: set more false if response was not blockwise 2022-04-22 10:12:27 +02:00
Benjamin Valentin
a5bc3cc069 nanocoap_sock: pass on error code 2022-04-22 10:12:27 +02:00
benpicco
c032e40fba
Merge pull request #17976 from benpicco/coap_get_token
nanocoap: add coap_get_token()
2022-04-22 10:08:30 +02:00
Francisco
7307923703
Merge pull request #17960 from benpicco/sock_urlpath
nanocoap_sock: add nanocoap_sock_url_connect()
2022-04-22 08:26:12 +02:00
Benjamin Valentin
5c1ff580d6 nanocoap_sock: don't decrement retries twice 2022-04-21 15:39:25 +02:00
Benjamin Valentin
845a757eed nanocoap: don't set lastonum if no option was added 2022-04-21 15:39:25 +02:00
Benjamin Valentin
76e2500b7d nanocoap_sock: use random message IDs 2022-04-21 15:39:25 +02:00
Benjamin Valentin
c4f6249992 nanocoap: make use of coap_get_token() 2022-04-21 15:34:31 +02:00
Benjamin Valentin
3d0c1d09c4 gcoap: make use of coap_get_token() 2022-04-21 15:34:31 +02:00
Benjamin Valentin
8d391a4f5f nanocoap_sock: use random timeout 2022-04-21 15:03:31 +02:00
fabian18
5643b52879
Merge pull request #17814 from fabian18/bugfix_nib_sllao_in_NS_6LR
ipv6/nib: bugfix handle SLLAO on 6LR if ARO is not present
2022-04-18 17:54:04 +02:00
Benjamin Valentin
2ea6c81217 nanocoap_sock: add nanocoap_sock_url_connect() 2022-04-18 01:53:23 +02:00
Benjamin Valentin
f6be7d6ffe sys/net/sock_util: add sock_urlpath() 2022-04-18 01:36:50 +02:00
Fabian Hüßler
560e43ae56 ipv6/nib: bugfix handle SLLAO on 6LR if ARO is not present 2022-04-18 00:09:53 +02:00
benpicco
4bad5a10bc
Merge pull request #17944 from fjmolinas/pr_gcoap_deps_fixes
gcoap: small dependencies fixes
2022-04-14 18:34:45 +02:00
benpicco
2acbb5ebea
Merge pull request #17947 from fjmolinas/pr_proxy_use_gcoap_port
sys/net/application_layer/gcoap: use COAP_PORT
2022-04-14 16:05:28 +02:00
Francisco Molina
c67a2086de sys/net/application_layer/gcoap: use COAP_PORT 2022-04-14 09:24:35 +02:00
Francisco Molina
14b3659699 sys/net/gnrc: fix alignment 2022-04-14 09:04:44 +02:00
benpicco
32790eb8f2
Merge pull request #17509 from benpicco/nanocoap-rework
sys/net/nanocoap: refactor to remove work-buffer requirement
2022-04-14 01:17:30 +02:00
Benjamin Valentin
dbbb602522 net/coap: refactor nanocoap_request for zero-copy operation
This removes the need for a user provied work buffer from nanocoap.
Instead we let the user operate directly on network stack internal
memory and provide a callback mechanism to make sure the memory is
properly freed again.
2022-04-13 19:33:00 +02:00
benpicco
3e03fe669a
Merge pull request #17600 from benpicco/gnrc/nib-ra_on_ra
gnrc/nib: only enable RTR_ADV on RA if MULTIHOP_P6C is enabled
2022-04-13 18:44:10 +02:00
Fabian Hüßler
2139b51cb5 gnrc/nib: only enable RTR_ADV on RA if MULTIHOP_P6C is enabled
If multihop distribution is not done using RA messages, then the
routers follow [RFC4861], which states that they merely do some
consistency checks; in this case, nothing in Section 8.1 applies.

 - https://datatracker.ietf.org/doc/html/rfc6775#section-8.1
2022-04-13 00:20:52 +02:00
Oleg Hahm
755ea30da7
Merge pull request #17871 from HendrikVE/pr/sock_dns_mock
sys/net/application_layer/sock_dns_mock: add module for mocking sock_dns
2022-04-08 14:20:17 +02:00
Francisco
c07a11c8cd
Merge pull request #17892 from kfessel/p-ztimer-conversions
sys: some simple xtimer->ztimer conversions
2022-04-04 09:17:46 +02:00
benpicco
e97ef479d6
Merge pull request #17778 from fabian18/bugfix_ndp_override_flag_for_non_anycast
gnrc/ndp: bugfix set O-flag if target is not anycast
2022-04-04 01:09:51 +02:00
Hendrik van Essen
a9fb3388ca sys/net/application_layer/sock_dns_mock: add module for mocking sock_dns 2022-04-03 17:29:10 +02:00
Karl Fessel
eabdf45b30 net/csma_sender: convert to ztimer_usec 2022-03-31 23:37:54 +02:00
chrysn
d6115e3505
Merge pull request #17881 from miri64/nanocoap/enh/opt_remove
nanocoap: introduce coap_opt_remove()
2022-03-31 14:50:48 +02:00
Karl Fessel
a42c39dbea net/uhcp: convert to ztimer 2022-03-31 12:50:31 +02:00
Martine Lenders
00fdd8a146
nanocoap: introduce coap_opt_remove() 2022-03-31 09:47:57 +02:00
Benjamin Valentin
d800cca1c3 drivers/atwinc15x0: register with netdev 2022-03-30 16:07:29 +02:00
benpicco
6849e33854
Merge pull request #17736 from benpicco/dhcpv6-tweaks
sys/net/dhcpv6: miscellaneous tweaks
2022-03-29 13:52:41 +02:00
benpicco
cdffc8f0ca
Merge pull request #17859 from benpicco/use_sock_tl_name2ep
treewide: use sock_tl_name2ep() class of functions where applicable
2022-03-29 12:31:51 +02:00
fabian18
c0f26fcaaa
Merge pull request #17803 from benpicco/gnrc/ipv6/nib-adv_address
gnrc/nib: don't advertise single address for auto-configuration
2022-03-29 10:49:54 +02:00
Benjamin Valentin
79f0354608 sys/net/sock_util: don't request AF in DNS which is not enabled 2022-03-29 10:44:22 +02:00
Martine Lenders
ef7329f85c
Merge pull request #17855 from miri64/ztimer/fix/init-unitialized
treewide: initialize several stack-allocated, but uninitialized timer structs
2022-03-28 20:05:47 +02:00
benpicco
1133d04de1
Merge pull request #17813 from leandrolanzieri/pr/tests/eth_drivers_rework
tests: rework eth drivers
2022-03-28 18:15:27 +02:00
Benjamin Valentin
37a4fffb17 sys/net/dhcpv6: consider option 0 an end marker
The REPLY of a TP-Link router (WR400 v4.20) ends with a 0 option
that has a bogus length.
When subtracting the length from the remaining length, we get an
underflow (remaining `len` is 3, option len is 4).

To get a working DHCP response, consider 0 (Reserved) an end marker.
2022-03-28 14:53:00 +02:00
Benjamin Valentin
922a1d7c9a sys/net/dhcpv6: make sanity check more lenient
If we did not enable downstream interfaces yet but have IA_PD enabled
or if we did not configure an interface for IA_NA but have the module
enabled, don't discard the DHCP reply.

If a server does not support an option it will respond with an error
code.
2022-03-28 14:52:59 +02:00
Marian Buschsieweke
a20d8f67f5
Merge pull request #17856 from miri64/gnrc_netif/fix/null-ptr
gnrc_netif: fix potential null pointer dereference
2022-03-26 20:49:48 +01:00
fabian18
09b98ea4fc
Merge pull request #17850 from fabian18/bugfix_nib_6LN_context_option_length
ipv6/nib: bugfix of 6CO length checking
2022-03-24 22:07:18 +01:00
Benjamin Valentin
9cab45931a nanocoap: replace sock_udp_str2ep() with sock_udp_name2ep() 2022-03-24 17:09:16 +01:00
Martine Lenders
76935ddbf5
Merge pull request #17510 from benpicco/sock_tl_str2ep-dns
sys/net/sock_util: add sock_tl_name2ep() to optionally perform DNS lookups
2022-03-24 15:59:59 +01:00
Martine Lenders
624e8099ec
gnrc_netif: fix potential null pointer dereference 2022-03-24 15:53:23 +01:00
Martine Lenders
5aefb8d5dc
gnrc_sock: initialized un-initialized timer objects 2022-03-24 15:23:50 +01:00
Francisco
d53f37546f
Merge pull request #17852 from fjmolinas/pr_gnrc_sock_ztimer_alt
sys/net/gnrc/sock: use ztimer_usec or xtimer for timeout
2022-03-24 14:22:55 +01:00
Fabian Hüßler
77cbe15b1d ipv6/nib: bugfix of 6CO length checking 2022-03-24 10:06:56 +01:00
Leandro Lanzieri
a2e5934ec9
drivers/encx24j600: introduce setup function with index 2022-03-24 09:32:10 +01:00
Leandro Lanzieri
5f7a906b95
drivers/w5100: introduce setup with index 2022-03-24 09:30:42 +01:00
Francisco Molina
66d87fccf9 sys/net/gnrc/sock: use ztimer_usec or xtimer for timeout 2022-03-24 08:06:05 +01:00
Benjamin Valentin
15f210e4e4 gnrc/nib: don't advertise /128 prefix for auto-configuration
A single IP address will be added as a /128 prefix.
It makes sense to advertise it, as neighbors can then know that
the address/prefix is on-link.

It does however not make sense to advertise the prefix as suitable
for auto-configuration.

Co-authored-by: Fabian Hüßler <fabian.huessler@st.ovgu.de>
2022-03-22 20:52:38 +01:00
Fabian Hüßler
bc3dfd4fda gnrc/ndp: bugfix set O-flag on non anycast target 2022-03-22 13:03:28 +01:00
Benjamin Valentin
1ef6da7de4 sys/net/sock_util: add sock_tl_name2ep() 2022-03-22 11:03:12 +01:00
Benjamin Valentin
a6a8356385 nanocoap: add nanocoap_get_blockwise_url_to_buf() function
This moves the internal convenience function suit_coap_get_blockwise_url_buf()
into nanocoap to make it globally available.
2022-03-22 10:36:50 +01:00
Martine Lenders
bec2868223
Merge pull request #17676 from benpicco/revert-gnrc_ipv6_nib-all_ifs
Revert "gnrc_ipv6_nib: consider all local interfaces when looking for…
2022-03-14 10:31:16 +01:00
Cenk Gündoğan
9746c3a830
nanocoap: add COAP_IGNORE for when method parsing is not important 2022-03-11 14:53:17 +01:00
Cenk Gündoğan
fa19b62cdb
gcoap/forward_proxy: add submodule 2022-03-11 14:53:17 +01:00
Marian Buschsieweke
f298d0a585
Merge pull request #17780 from benpicco/gnrc_sock-iolist
net/gnrc_sock: depend on iolist
2022-03-10 11:38:14 +01:00
benpicco
9896071bb9
Merge pull request #17493 from HendrikVE/pr/auto_init_sock_dns
sys/net/application_layer/sock_dns: add pseudomodule auto_init_sock_dns
2022-03-10 00:53:32 +01:00
Benjamin Valentin
32cf05b110 net/gnrc_sock: depend on iolist 2022-03-09 22:42:01 +01:00
Hendrik van Essen
0b0910f82a sys/net/application_layer/sock_dns: add pseudomodule auto_init_sock_dns 2022-03-09 20:05:20 +01:00
benpicco
f83fa88ccd
Merge pull request #17764 from HendrikVE/pr/netutils_netutils_get_ipv4
sys/net/netutils: add netutils_get_ipv4()
2022-03-09 11:30:38 +01:00
benpicco
948e8d9463
Merge pull request #17766 from HendrikVE/pr/sock_util_fix_compilation_ipv4
sys/net/sock_util: fix compilation for IPv4-only mode
2022-03-09 01:47:40 +01:00
Hendrik van Essen
ffd93c9b1b sys/net/netutils: add netutils_get_ipv4() 2022-03-08 13:35:32 +01:00
benpicco
2d89399047
Merge pull request #17745 from leandrolanzieri/cpu/esp32/esp-eth/move_auto_init
cpu/esp32/esp-eth: move GNRC auto_init to init_devs
2022-03-07 20:25:06 +01:00
Dylan Laduranty
9d459b8a14
Merge pull request #17746 from leandrolanzieri/cpu/sam0_common/eth/expose_correct_setup
cpu/sam0_common/eth: expose correct setup function
2022-03-07 18:42:08 +01:00
benpicco
a9456b6935
Merge pull request #17741 from fabian18/bugfix-NIB_handle_rtr_timeout
ipv6/nib: fix memcpy() bug in _handle_rtr_timeout()
2022-03-07 13:39:05 +01:00
Hendrik van Essen
73431b398d sys/net/sock_util: fix compilation for IPv4-only mode 2022-03-07 02:58:17 +01:00
Hendrik van Essen
a3faa79612 sys/net/netutils: add missing string.h include 2022-03-07 02:57:50 +01:00
benpicco
f31fdfd12d
Merge pull request #17747 from leandrolanzieri/drivers/encx24j600/default_params
drivers/encx24j600: define default parameters
2022-03-05 10:29:48 +01:00
Leandro Lanzieri
de79edb352
drivers/encx24j600: define default parameters 2022-03-04 09:58:50 +01:00
Leandro Lanzieri
74c8893a4f
cpu/esp32/esp-eth: move GNRC auto init to init_devs 2022-03-04 09:41:18 +01:00
Leandro Lanzieri
f1075ad749
cpu/sam0_common/eth: expose correct setup function 2022-03-04 08:57:42 +01:00
Francisco Molina
1aea12c27c sys/net/gnrc/sock_types: guard tcp.h header inclusion 2022-03-04 08:47:47 +01:00
Francisco
0c166b1e2a
Merge pull request #17732 from fjmolinas/pr_xtimer_compat_deps
sys: sort out ztimer_xtimer_compat and ztimer64_xtimer_compat depes
2022-03-04 08:08:41 +01:00
Fabian Hüßler
6916f72419 ipv6/nib: fix memcpy() bug in _handle_rtr_timeout 2022-03-03 23:35:06 +01:00
c7c5279362
Merge pull request #17731 from fjmolinas/pr_csma_sender_use_public_api
sys/net/link_layer/csma_sender: use public xtimer_now()
2022-03-03 19:20:18 +01:00
benpicco
c411edef55
Merge pull request #16688 from miri64/gcoap/enh/multitransport
gcoap: multi-transport support
2022-03-03 12:15:48 +01:00
Benjamin Valentin
9eb62da2d4 gnrc_dhcpv6_client_simple_pd: set AAC_DHCP if IA_NA is enabled 2022-03-02 14:53:09 +01:00
Francisco Molina
6151895bfa sys: use ztimer64_xtimer_compat when required 2022-03-02 14:28:54 +01:00
Francisco Molina
8378b401d8 sys/net/link_layer/csma_sender: use public xtimer_now_usec() 2022-03-02 12:06:47 +01:00
ce1ec91adc
Merge pull request #17729 from fjmolinas/pr_gomach_no_periph_rtt_ztimer
sys/net/gnrc: ztimer_no_periph_rtt if gomach
2022-03-02 10:59:33 +01:00
Francisco Molina
a151a8e66a sys/net/gnrc: ztimer_no_periph_rtt if gomach 2022-03-02 08:33:29 +01:00
Benjamin Valentin
2034fa5101 sys/net/application_layer: add telnet server module 2022-03-01 23:07:22 +01:00
Benjamin Valentin
1b52dee2d6 net/gnrc: restore inclusion of net/gnrc/tcp.h
This reverts d03175c2ae
2022-03-01 23:07:21 +01:00
Martine Lenders
287bfdc10d
gcoap: multi-transport support for listeners 2022-03-01 19:33:15 +01:00
Martine Lenders
90eae8e0a4
gcoap: multi-transport support for clients
23a8659bdf introduced DTLS support for
CoAP, but did not make it possible to select the transport on request.
Since switching between CoAP and CoAPS (CoAP-over-DTLS) as client is a
valid use case (one might want to e.g. talk to one server over CoAP and
to another over CoAPS), this change makes that possible.
2022-03-01 19:26:10 +01:00
a17ff53ecf
Merge pull request #17485 from benpicco/sock_udp_sendv
sys/net/sock: add sock_udp_sendv() API
2022-03-01 14:05:21 +01:00
Karl Fessel
35107ec4ba sys/net: add missing includes 2022-02-28 14:53:07 +01:00
Karl Fessel
d03175c2ae net/gnrc: avoid *timer creeping though header 2022-02-28 14:53:07 +01:00
benpicco
bbfa69153e
Merge pull request #17474 from benpicco/nanocoap-suit
sys/net/nanocoap: introduce `nanocoap_sock_*()`, use in suit/transport/coap
2022-02-27 02:07:50 +01:00
benpicco
67b98fd741 sys/net/nanocoap: introduce nanocoap_sock_*()
Co-authored-by: Jan Romann <jan.romann@uni-bremen.de>
2022-02-24 12:20:47 +01:00