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

3335 Commits

Author SHA1 Message Date
Martine S. Lenders
3bf426e6fc
gnrc_sixlowpan_iphc: factor-out IPv6 header decoding into own function 2019-12-10 15:46:51 +01:00
Martine S. Lenders
8ce3c745c8
gnrc_sixlowpan_iphc: add extension header encoding 2019-12-10 15:31:56 +01:00
Martine S. Lenders
a0a334a491
gnrc_sixlowpan_iphc: factor-out IPv6 header encoding into own function 2019-12-10 15:29:06 +01:00
Martine Lenders
f38f974d86
Merge pull request #12629 from miri64/gnrc_sixlowpan_iphc/enh/vrb-creation
gnrc_sixlowpan_iphc: add fragment forwarding stubs
2019-12-10 14:58:01 +01:00
Martine S. Lenders
3273602f24
tests: provide test application for IPHC+VRB behavior 2019-12-10 13:59:41 +01:00
Martine Lenders
a689f51e9a
gnrc_sixlowpan_iphc: add rudimentary forwarding routine 2019-12-10 13:56:33 +01:00
Martine S. Lenders
e31394536b
gnrc_sixlowpan_iphc: factor encoding out of sending function 2019-12-10 13:56:05 +01:00
Martine S. Lenders
556d71a7da
gnrc_sixlowpan_iphc: create VRB entry from uncompressed header
... when VRB is available
2019-12-10 13:56:02 +01:00
José Alamos
2027efa9f4
Merge pull request #12894 from leandrolanzieri/pr/gnrc_doc_config_group
net/gnrc: Group compile configuration Doxygen groups and add GNRC LoRaWAN
2019-12-09 18:20:35 +01:00
Martine Lenders
7b13781cd2
Merge pull request #12625 from miri64/gnrc_sock/enh/async-support
gnrc_sock: provide asynchronous event implementation
2019-12-09 12:39:58 +01:00
Leandro Lanzieri
9a0a514fdd Kconfig: Expose gnrc/ipv6/whitelist configurations 2019-12-06 15:04:14 +01:00
Leandro Lanzieri
a626fec016 Kconfig: Add net/gnrc file and menu 2019-12-06 14:31:00 +01:00
Leandro Lanzieri
37624f4eed Kconfig: Add 'Networking' file and menu 2019-12-06 14:23:39 +01:00
Leandro Lanzieri
de2fbeb112 net/gnrc/ipv6_whitelist: Move config macros to 'CONFIG_' namespace
Macros that changed:
GNRC_IPV6_WHITELIST_SIZE -> CONFIG_GNRC_IPV6_WHITELIST_SIZE
2019-12-06 13:57:52 +01:00
Leandro Lanzieri
47981b96c1 sys/net/gnrc: Add GNRC configuration Doxygen group 2019-12-06 12:18:03 +01:00
Martine Lenders
159accff37 gnrc_ipv6: fix source check for loopback address
When the destination address is the loopback address (`::1`) in GNRC
the selected network interface typically is `NULL`, as with GNRC no
loopback interface de facto exists. So the assertion when checking if
the source address is valid if `netif != NULL` fails on that check.
This change fixes that issue by checking if the destination address is
the loopback address, before checking the validity of the source
address.
2019-12-05 23:38:53 +01:00
Jose Alamos
8999528390 net/gnrc_lorawan: add MIB for setting RX2 datarate 2019-12-03 14:48:29 +01:00
Jose Alamos
1e9bb7c175 net/gnrc_lorawan: add MIB for setting L2 address 2019-12-03 14:27:56 +01:00
Jose Alamos
99dbcecc3a net/gnrc_lorawan: remove netdev SAP interface 2019-12-03 14:08:35 +01:00
Martine Lenders
09c46e273d
Merge pull request #12845 from miri64/gnrc_sixlowpan_frag_rb/fix/rm-by-datagram-pkt-release
gnrc_sixlowpan_frag_rb: fix memory-leak in _rm_by_datagram()
2019-12-02 19:20:55 +01:00
benpicco
900c6994af
Merge pull request #12855 from miri64/gnrc_gomach/fix/i12853
gnrc_gomac: don't use constant as argument for RTT callback
2019-12-02 15:10:40 +01:00
Martine Lenders
e1f81f02fd gnrc_gomac: don't use constant as argument for RTT callback
The RTT callback for a super-frame cycle uses the `arg` pointer to set
the message value that then is handed to the GoMacH thread. However,
in both instances the timer is scheduled the constant
`GNRC_GOMACH_EVENT_RTT_NEW_CYCLE` is provided. This means the argument
is not really necessary.
2019-12-02 08:14:55 +01:00
Martine S. Lenders
0251d6585e
gnrc_sixlowpan_frag_rb: error when interval buffer is full 2019-11-29 18:00:54 +01:00
Martine S. Lenders
3fe1bf59a4
gnrc_sixlowpan_frag_rb: fix memory-leak in _rm_by_datagram()
This fits with the semantics of this function which doesn't provide or
uses any state of the reassembly buffer provided by the user, but finds
the entry itself and then removes it. This gives the user no chance to
remove the packet in the reassembly buffer entry, so
`gnrc_sixlowpan_frag_rb_rm_by_datagram()` has to release the packet
(other than `gnrc_sixlowpan_frag_rb_remove()` where not releasing the
packet is desired as it might be handed up to an upper layer).
2019-11-29 15:38:13 +01:00
Leandro Lanzieri
8aa66e94ea net/gnrc/netif: Remove 'if' prefix from interface names 2019-11-29 10:22:00 +01:00
Hauke Petersen
3a7b60e4d4 net/cord_epsim: adapt to gcoap API changes 2019-11-28 12:50:24 +01:00
Hauke Petersen
7b1217a529 net/cord_ep: adapt to gcoap API changes 2019-11-28 12:50:24 +01:00
Hauke Petersen
3fd8357071 net/gcoap: allow to pass user context to requests 2019-11-28 12:50:24 +01:00
Hauke Petersen
383f395af3 net/gcoap: pass memo to resp_handler directly 2019-11-28 12:48:37 +01:00
MichelRottleuthner
bf676d4728
Merge pull request #11022 from jia200x/pr/gnrc_lorawan
gnrc_lorawan: add support for GNRC based LoRaWAN stack
2019-11-27 09:25:20 +01:00
Jose Alamos
43b7164796 gnrc_pktdump: add NETTYPE_LORAWAN 2019-11-26 21:52:06 +01:00
Jose Alamos
2edaead13e gnrc_netif: add gnrc_lorawan adaption layer 2019-11-26 21:52:06 +01:00
Jose Alamos
39951b8f70 gnrc_lorawan: add initial support for LoRaWAN stack 2019-11-26 21:52:06 +01:00
Jose Alamos
a70b1858c4 netopt: add NETOPTs required for gnrc_lorawan 2019-11-26 21:52:05 +01:00
Hauke Petersen
17b1b19fda net/gcoap: do not allocate RX buf on stack 2019-11-26 15:00:03 +01:00
d4f3747705 sys/net: fix typos 2019-11-23 22:39:38 +01:00
Francois Berder
4a31f94cfc many typo fixes
Signed-off-by: Francois Berder <18538310+francois-berder@users.noreply.github.com>
2019-11-23 22:39:07 +01:00
Francisco Molina
ab16222c8b sys/net/routing/nhdp: fix cpp.check unitialized variable 2019-11-21 11:58:07 +01:00
Francisco Molina
bf3c722abc sys/net/network_layer: fix cpp.check unitialized variable 2019-11-21 11:58:07 +01:00
Martine S. Lenders
f2d1e661d1
gnrc_netapi: report errors on dispatch 2019-11-21 10:51:13 +01:00
Leandro Lanzieri
3c89597c83 net/gnrc/tcp: Adapt to change in ipv6_addr_split_iface 2019-11-15 14:02:50 +01:00
Leandro Lanzieri
4d4f6ae1d6 net/ipv6: Return string pointer when splitting IPv6 interface.
Right now 'ipv6_addr_split_iface' assumes that the interface specifier
will always be a number (based on GNRC way of identifying interfaces),
but this may not be always the case.In order to be able to use the
Network Interface API, interfaces should be referred by their name.

This changes 'ipv6_addr_split_iface' so it returns a pointer to the
string that specifies the interface.
2019-11-15 14:02:50 +01:00
Martine Lenders
02295ce5c7
Merge pull request #12593 from miri64/gnrc_sixlowpan_frag_rb/enh/deletion-timer
gnrc_sixlowpan_frag_rb: allow for deletion timer after completion
2019-11-12 17:54:15 +01:00
Martine S. Lenders
11669d9bdc gnrc_sixlowpan_frag_rb: add missing \n at end of DEBUG line 2019-11-12 17:06:52 +01:00
Martine S. Lenders
40138fdce8 gnrc_sixlowpan_frag_rb: allow for deletion timer after completion
This allows to set a timer between the completion of a datagram in the
reassembly buffer and the deletion of the corresponding reassembly
buffer entry. This allows to ignore potentially late incoming link-layer
duplicates of fragments of the datagram that then will have the
reassembly buffer entry be blocked.

This was noted in this [discussion] for classic 6LoWPAN reassembly (and
minimal fragment forwarding) and is recommended in the current
[selective fragment recovery draft][SFR draft].

[discussion]: https://mailarchive.ietf.org/arch/msg/6lo/Ez0tzZDqawVn6AFhYzAFWUOtJns
[SFR draft]: https://tools.ietf.org/html/draft-ietf-6lo-fragment-recovery-07#section-6
2019-11-12 17:06:52 +01:00
Martine Lenders
918a4ac04d
Merge pull request #12682 from miri64/gnrc_sock/fix/consider-all-snips-for-error
gnrc_sock: consider all pktsnip for gnrc_neterr reporting
2019-11-12 11:45:50 +01:00
Martine Lenders
8992dce4da gnrc_sock: consider all pktsnip for gnrc_neterr reporting
As analyzed in #12678 there are cases where different reports can be
generated for the different snips of the packet send via the `sock`.

To catch all errors generated by the stack, the sock has to subscribe
for all snips of the packet sent. If any of the snips reports an error
distinct from `GNRC_NETERR_SUCCESS` or the previous one, we report that
status instead of just the first we receive. This way we are ensured to
have the first error reported by the stack for the given packet.
2019-11-11 16:40:32 +01:00
Marian Buschsieweke
bd8c4b36aa
sys/net/gnrc: Flag cc110x as 6LN
In gnrc_netif_init_6ln() the flag GNRC_NETIF_FLAGS_6LN is accidentally not set
for cc110x devices. This commit fixes this.
2019-11-11 09:24:01 +01:00
Martine Lenders
f092c27356 gnrc_ipv6: add missing new-line to debug message 2019-11-10 13:50:56 +01:00
José Alamos
20ea18637f
Merge pull request #10485 from miri64/gnrc_netif/enh/default-init
gnrc_netif: assume `netif->ops->init()` to be set to at least a default
2019-11-07 11:41:05 +01:00
Martine Lenders
6493a9e69f gnrc_netif: assume netif->ops->init() to be set 2019-11-07 11:00:36 +01:00
Martine Lenders
14a2f6bc18 gnrc: use gnrc_netif_default_init() for all implementations 2019-11-07 11:00:36 +01:00
Martine Lenders
09b5db28f1 gnrc_netif: expose common init function as default 2019-11-06 18:45:16 +01:00
Martine Lenders
4b82a56c89 gnrc_netif: introduce common init function 2019-11-06 18:45:15 +01:00
Martine Lenders
ca37cde142 gnrc_sixlowpan_frag_fb: introduce function to get entry by tag 2019-11-04 20:04:39 +01:00
Martine Lenders
8c3dc66ad8 gnrc_sixlowpan_frag: factor-out and rename fragmentation buffer
The name `fragment_msg` or `frag_msg`/`msg_frag` always to me was a bit
misplaced, as it basically implements an asynchronous fragmentation
buffer and doesn't necessarily have anything to do with messages.
This change

1. changes the name to `fb` (for fragmentation buffer)
2. factors its code out to its own sub-module so it can be re-used by
   other 6LoWPAN fragmentation schemes like [Selective Fragment
   Recovery]

[Selective Fragment Recovery]: https://tools.ietf.org/html/draft-ietf-6lo-fragment-recovery-05
2019-11-04 20:04:37 +01:00
Martine Lenders
79c8fc5405
Merge pull request #12599 from miri64/gnrc_sixlowpan_frag/enh/remove-code-dup
gnrc_sixlowpan_frag: various optimizations and clean-ups on sending
2019-11-04 19:54:33 +01:00
Martine Lenders
2a1e002d6d
Merge pull request #12627 from miri64/gnrc_sixlowpan_iphc_nhc/enh/frag+iphc-payload_len
gnrc_sixlowpan_iphc_nhc: determine UDP hdr length from RB
2019-11-01 19:47:08 +01:00
Martine S. Lenders
f33111a9c2 gnrc_sixlowpan_iphc: remove duplicate gnrc_netif_hdr_get_netif()
The interface is already fetched in the beginning of the function and
doesn't change during its run, so getting the interface again at this
point is just redundant.
2019-11-01 18:29:44 +01:00
Martine S. Lenders
806f33fce4 gnrc_sixlowpan_iphc_nhc: determine UDP hdr length from RB
When decoding IPHC in a fragmented datagram, relying on the size of the
allocated space for the decoded packet is wrong when fragments are
forwarded and decoded on an intermediate node (for which the reassembly
buffer's space is used): Using the full datagram size for allocation in
this case would be wasteful, so the allocated space is only marginally
larger than the fragment's compressed form.
This in turn results in the wrong UDP payload size being chosen and
even worse being forwarded to the subsequent nodes.

This change uses the (virtual) reassembly buffer's `datagram_size`
instead of relying on the allocated space for the encoded
datagram/fragment.
2019-11-01 13:18:00 +01:00
Martine S. Lenders
b713413c52 gnrc_sock: provide asynchronous event implementation 2019-11-01 00:21:04 +01:00
Martine Lenders
5d11cf26f0 gnrc_netif: use 6LoENC only when 6Lo flag is set 2019-10-30 17:10:34 +01:00
Martine Lenders
e04a190511 gnrc_netif_ethernet: make 6LO configurable for 6LoEnc 2019-10-30 17:10:34 +01:00
8b06560c02
sys/net/nanocoap: correctly initialize array 2019-10-30 17:03:06 +01:00
95da51bd7f
sys/net/nanocoap: fix potential use of uinitialized variable 2019-10-30 17:03:06 +01:00
5d1480a4b8
sys/net/nanocoap: fail when start data cannot be parsed 2019-10-30 17:03:06 +01:00
1aa1e2c8cc
sys/net/nanocoap: return ENOENT if parsing option failed
This fixes a potential use of uninitialized len in subsequent function calls.

This was reported by scan-build
2019-10-30 17:03:06 +01:00
Martine Lenders
bf5b53392c
Merge pull request #12603 from jia200x/pr/link_up
netopt: redefine NETOPT_LINK_CONNECTED
2019-10-30 15:19:07 +01:00
Jose Alamos
43a5fdc870 netopt: rename NETOPT_LINK_CONNECTED 2019-10-30 12:13:36 +01:00
Martine S. Lenders
dba2f9e5ea gnrc_sixlowpan_frag: remove code duplication on fragment creation 2019-10-29 15:34:24 +01:00
Martine S. Lenders
d5e21f35c3 gnrc_sixlowpan_frag: copy netif header directly 2019-10-29 15:34:24 +01:00
Martine Lenders
05d338169d
Merge pull request #12367 from brummer-simon/gnrc_tcp-fix_recv_conn_closed
gnrc_tcp: return immediatly on gnrc_tcp_recv if a connection is closing
2019-10-29 09:54:43 +01:00
benpicco
456982f595
Merge pull request #12595 from aabadie/pr/net/sock_util_scan_build
sys/net/sock_util: fix dead initialization warning
2019-10-28 17:24:50 +01:00
2b0b591c85
sys/net/sock_util: fix dead initialization warning
This was reported by LLVM scan build. The value assigned at initialization is never used, so could be removed
2019-10-28 16:35:18 +01:00
a9399810d5
sys/net/uhcp: remove unused returned value in uhcp_client 2019-10-28 15:14:40 +01:00
aaadaccc3f
sys/net/nanocoap: fix dead assignment in nanocoap server 2019-10-27 10:49:41 +01:00
Francisco
0364c39694
Merge pull request #12408 from miri64/gnrc_netif/fix/src-addr-selection
gnrc_netif: only use prefix matching as tie-breaker in source selection
2019-10-24 17:14:17 +02:00
Martine S. Lenders
e9d75f5655 gnrc_netif: remove filter parameter from _match_to_idx()
`_match_to_idx()` was removed from source address selection (which was
the only one setting the filter parameter to a non-NULL value), so it
is the parameter is not needed anymore.
2019-10-24 16:04:41 +02:00
Martine S. Lenders
e787f6b60d gnrc_netif: only use prefix matching as tie-breaker in source selection
When source address selection is done, both RFC and comments in the code
state, that a longest prefix match should *only* be used as a
tie-breaker between more than one viable candidate. If there is only one
address, there is

a) no need for a tie-breaker
b) in the case of either the destination address or the single remaining
   address being ULAs ([which are considered to be of global scope]
   [RFC4193]) possibly not matching, as `fd00::/7` and e.g. `2001::/8`
   do not have a common prefix.

(b) in fact causes the match function to return -1, causing the source
address selection to return -1, causing the outer function to return the
first address it found (which most often is the link-local address),
causing e.g. a ping to an ULA to fail, even is there is a global
address.

[RFC4193]: https://tools.ietf.org/html/rfc4193
2019-10-24 16:04:41 +02:00
Cenk Gündoğan
e0ab8776f3
Merge pull request #12547 from miri64/gnrc_netif/enh/warn-no-ARSM
gnrc_netif: warn when not joining solicited-nodes from non-6LN netif
2019-10-24 13:46:38 +02:00
Martine Lenders
796d6a3167 gnrc_sixlowpan: move garbage collect msg type to reassembly buffer 2019-10-24 12:41:29 +02:00
Martine Lenders
41708d9f03 gnrc_pktbuf_static: unify NULL pointer output for stats
Different platforms evaluate `printf()` for NULL pointers differently,
resulting tests checking for a certain output to fail. This unifies that
(debug) output for the static packet buffer statistics.
2019-10-23 14:56:29 +02:00
Martine Lenders
88090bc0f6 gnrc_netif: warn when not joining solicited-nodes from non-6LN netif
Similar as with #12513, when the NIB is compiled in 6LN mode (but not
6LR mode), the address-resolution state-machine (ARSM) functionality is
disabled in favor of the more simpler address resolution proposed in RFC
6775.

However, if a non-6LN interface is also compiled in (without making it
a router or border router) it will never join the solicited-nodes
multicast address of addresses added to it, resulting in address
resolution to that interface to fail.

If the interface is not a 6LN (which in case 6LN mode is disabled is
always false), a warning is now printed, encouraging the user to
activate the ARSM functionality if needed.
2019-10-22 22:14:03 +02:00
Simon Brummer
1eb2969986 gnrc_tcp_recv: immediatly return on closed connection 2019-10-22 20:12:38 +02:00
Martine S. Lenders
2458a612b6 gnrc_netif: reduce code duplication 2019-10-21 16:09:37 +02:00
Martine S. Lenders
e96faca739 gnrc_netif: add code comments on source candidate set selection 2019-10-21 16:09:37 +02:00
f8de22a985 gnrc/netif: _match_to_idx(): don't treat link local differently
Cherry-picked from 811c1ee70e (#12404)
2019-10-21 16:09:37 +02:00
Martine Lenders
1bdfbeaaa0
Merge pull request #12425 from miri64/gnrc_ipv6_nib/enh/mutex
gnrc_ipv6_nib: use recursive mutex instead of mutex for locking
2019-10-21 16:08:07 +02:00
Martine Lenders
05bcdba02e
Merge pull request #10499 from miri64/gnrc_netif/enh/split-6lo-6ln
gnrc_netif: introduce distinction if an interface supports 6Lo or if it performs ND according to RFC 6775
2019-10-21 11:47:30 +02:00
Martine Lenders
8b2f697f8c
Merge pull request #12512 from miri64/gnrc_ipv6/fix/i11980
gnrc_ipv6: fix SEGFAULT when multicasting with multiple interfaces
2019-10-21 09:44:44 +02:00
Martine Lenders
7cba2fb63d gnrc_ipv6_nib: don't auto-configure IPv6 w/o SLAAC on non-6LN interface
When the NIB is compiled for 6LN mode (but not a 6LBR), the Stateless
Address Autoconfiguration (SLAAC) functionality is disabled, as it is
typically not required; see `sys/include/net/gnrc/ipv6/nib/conf.h`, ll.
46 and 55. However, if a non-6LN interface is also compiled in (still
without making the node a border router) an auto-configured address will
be assigned in accordance with [RFC 6775] to the interface, just
assuming the interface is a 6LN interface. As it then only performs
duplicate address detection RFC-6775-style then, the address then never
becomes valid, as the duplicate address detection according to [RFC
4862] (part of the SLAAC functionality) is never performed.

As auto-configuring an address without SLAAC doesn't make sense, this
fix makes the interface skip it completely, but provides a warning to
the user, so they know what to do.

[RFC 6775]: https://tools.ietf.org/html/rfc6775#section-5.2
[RFC 4862]: https://tools.ietf.org/html/rfc4862#section-5.4
2019-10-21 00:17:12 +02:00
Martine Lenders
6ad62b01a4 gnrc_netif: distinct is_6lo() and is_6ln()
The functions now are semantic distinct:

- gnrc_netif_is_6lo(): the interface is a 6Lo interface
- gnrc_netif_is_6ln(): the interface is using Neighbor Discovery
  according to RFC 6775
2019-10-20 15:38:14 +02:00
Martine Lenders
363afa62ee gnrc_netif: introduce 6LN flag
This makes it dynamically configurable if an interface actually want's
to use 6Lo ND (according to RFC 6775) or not.
2019-10-20 15:38:13 +02:00
Martine Lenders
fb0e9559a1 gnrc_ipv6: use is_6lo() instead of is_6ln()
We want to check if the interface is an interface requiring the 6Lo
adaptation layer, not if it is a 6LN according to RFC 6775 [[1]].

[1]: https://tools.ietf.org/html/rfc6775#section-2
2019-10-20 15:38:13 +02:00
Martine Lenders
8bcce5615e gnrc_netif: use is_6lo() instead of is_6ln() 2019-10-20 15:38:13 +02:00
Martine Lenders
ce14ee1f77 gnrc_ipv6: fix SEGFAULT when multicasting with multiple interfaces
When writing to the IPv6 header the implementation currently doesn't
take the packet with the (potentially) duplicated header, but the
packet with the original one, which leads to the packet sent and then
released in `gnrc_netif_ethernet.c` first and then accessed again in
further iterations of the "writing to the IPv6 header" loop, which
causes access to an invalid pointer, causing a crash.

Fixes #11980
2019-10-20 14:25:40 +02:00
Martine Lenders
f228dedcf4 gnrc_sixlowpan_frag_rb: fix comment typo 2019-10-19 16:30:45 +02:00
Martine S. Lenders
5bf9892bb3 gnrc_sixlowpan_frag_rb: add new functions for SFR 2019-10-19 16:30:45 +02:00
Martine Lenders
78f04c9fd1
Merge pull request #12441 from miri64/gnrc_icmpv6_error/fix/not-send
gnrc_icmpv6_error: consider originator's destination address correctly
2019-10-19 15:18:50 +02:00
Martine Lenders
c32f1076f6 gnrc_icmpv6_error: consider originator's destination address correctly
While 485dbd1fda (from #12175) was right
in assuming that the for most ICMPv6 error messages the originating
packet's destination address must not be a multicast, this is not the
case for _all_ ICMPv6 error messages (see [RFC 4443], section 2.4(e.3)).
Additionally, 485dbd1fda removed the
check for the source address ([RFC 4443], section 2.4(e.6)), which this
PR re-adds.

[RFC 4443]: https://tools.ietf.org/html/rfc4443#section-2.4
2019-10-19 14:39:45 +02:00
Martine S. Lenders
184e91780a gnrc_sixlowpan_frag_rb: explain second _rbuf_add() call more detailed 2019-10-18 11:14:13 +02:00
Martine S. Lenders
f8d75d7add gnrc_sixlowpan_frag_rb: behavioral change to add()
Rather than dispatching the packet automatically once it is complete,
`gnrc_sixlowpan_frag_rb_add()` now only returns success, and leaves it
to the caller to dispatch the packet.
2019-10-18 09:02:32 +02:00
Martine S. Lenders
a229755abe gnrc_sixlowpan_frag_rb: return status on dispatch_when_complete() 2019-10-18 09:02:32 +02:00
Martine S. Lenders
b086453347 gnrc_sixlowpan_frag_rb: return pointer to entry on add() 2019-10-18 09:02:32 +02:00
Martine S. Lenders
3a4ebe98c3 gnrc_sixlowpan_frag_rb: get index instead of pointer with _rbuf_get() 2019-10-18 09:02:31 +02:00
Cenk Gündoğan
eb981fe8dd
Merge pull request #12444 from miri64/gnrc_sixlowpan_frag_rb/enh/factor-frag-out
gnrc_sixlowpan_frag_rb: seperate out classic frag specific code
2019-10-15 17:41:29 +02:00
Martine Lenders
2a74d32ea9 gnrc_sixlowpan_frag_rb: seperate out classic frag specific code 2019-10-15 10:40:50 +02:00
Martine Lenders
b5b52c74e8 gnrc_ipv6: only discard invalid source when assigned to interface
While it is correct to not use an invalid address as a source address,
it is incorrect to assume that addresses not assigned to the interface
(`idx == -1` in the respective piece of code) are invalid: Other than
classic forwarding via a FIB, forwarded packets utilizing a IPv6
routing header will pass this check, like any other packet sent by this
node. The source address for these is not on the given node, so e.g.
source routing is not possible at the moment.
2019-10-14 15:43:07 +02:00
Martine Lenders
a279228663 gnrc_rpl_srh: don't send error message on multicast error
A node is not supposed to send an ICMPv6 error message when the
destination or one of the addresses in the source route is multicast
but is supposed to be silently discarded (see [RFC4443] and [RFC6554]).
If we leave the `err_ptr` unset, the [node will not send an error
message][err_ptr set].

[RFC 4443]: https://tools.ietf.org/html/rfc4443#section-2.4
[RFC 6554]: https://tools.ietf.org/html/rfc6554#section-4.2
[err_ptr set]: https://github.com/RIOT-OS/RIOT/blob/9bc600a/sys/net/gnrc/network_layer/ipv6/ext/rh/gnrc_ipv6_ext_rh.c#L100-L105
2019-10-14 11:25:53 +02:00
Martine Lenders
c94de51e03
Merge pull request #12414 from miri64/gnrc_ipv6_ext_frag/fix/n-th-with-full-rbuf
gnrc_ipv6_ext_frag: fix release on rbuf creation for n-th fragment
2019-10-13 15:10:50 +02:00
Martine S. Lenders
e98f3e48f4 gnrc_ipv6_nib: use rmutex instead of mutex for locking 2019-10-11 12:24:37 +02:00
Martine S. Lenders
01351206d5 gnrc_ipv6_nib: make mutex private 2019-10-11 12:18:52 +02:00
Martine S. Lenders
a14e834ad8 gnrc_ipv6_nib: use mutex wrapper function instead of mutex functions 2019-10-11 12:17:05 +02:00
Martine S. Lenders
1ce19e26b4 gnrc_ipv6_nib: wrap mutex lock/unlock in function 2019-10-11 12:13:32 +02:00
Jose Alamos
8fd0c2b60f gnrc_netif: adapt to new netif_t abstraction 2019-10-11 10:59:14 +02:00
Jose Alamos
77a7aed6e6 netif: introduce descriptor based netif 2019-10-11 10:59:14 +02:00
Martine S. Lenders
095e966b73 gnrc_ipv6_ext_frag: fix release on rbuf creation for n-th fragment
The IPv6 (extension) headers of the first fragment received are re-used
for the reassembled packet, so when receiving a subsequent packet we
need to distinguish, if we just want to release the payload or all of
the packet after the packet data was added to the reassembly buffer.
2019-10-10 16:41:51 +02:00
Martine S. Lenders
ada7c0b7db gnrc_netif: avoid deprecated addresses, don't prefer them! 2019-10-09 15:18:14 +02:00
Martine S. Lenders
f6686e92f1 gnrc_sixlowpan_frag_vrb: add gnrc_sixlowpan_frag_vrb_from_route()
This adds a new VRB function that receives a header with forwarding
information and creates a VRB entry from it. Currently, only IPv6 is
supported.
2019-10-07 18:16:47 +02:00
Martine S. Lenders
c6781af281 gnrc_sixlowpan_frag_vrb: rename addr_str variable 2019-10-07 17:52:09 +02:00
Martine Lenders
9d0faa9e5f
Merge pull request #11957 from miri64/emcute/fix/payload-copy-error
emcute: fix payload copy error for emcute_pub
2019-10-07 17:17:44 +02:00
Martine Lenders
999a7714b0
Merge pull request #12382 from nmeum/pr/asymcute_continue
emcute: never return from receive loop
2019-10-07 16:28:09 +02:00
Sören Tempel
74e19d451c emcute: never return from receive loop
Without this change an attacker would be able to stop the emcute server
by sending a crafted packet triggering this branch. The solution is
using `continue` instead of `return`.
2019-10-07 15:12:20 +02:00
Martine Lenders
9ab67a6d89
Merge pull request #12379 from brummer-simon/gnrc_tcp-no_reopen_recv_window_on_closed_conn
gnrc_tcp: do not reopen recv window on closed connection
2019-10-06 17:32:49 +02:00
Simon Brummer
4fbc0252e1 gnrc_tcp: do not reopen recv window on closed connection 2019-10-06 12:13:37 +02:00
Martine Lenders
b99ec92e6a
Merge pull request #12368 from miri64/gnrc_tcp/fix/check-option-length
gnrc_tcp: check if option has valid length set
2019-10-05 15:11:38 +02:00
Francisco
7d7596ea6c
Merge pull request #11057 from kb2ma/coap/block_optimization
net/coap: Block optimizations
2019-10-04 09:41:05 +02:00
Ken Bannister
2dc4209c0e net/nanocoap: optimize determination of exponent for block szx 2019-10-03 13:17:09 -04:00
Martine Lenders
66e5f7230f gnrc_tcp: check if option has valid length set 2019-10-03 18:30:40 +02:00
Simon Brummer
07210ee571 gnrc_tcp: fix debug message 2019-10-03 15:54:36 +02:00
Ken Bannister
e22d4729e1 net/nanocoap: initialize offset attribute 2019-10-02 05:51:59 -04:00
Ken Bannister
2abcbc0d20 net/coap: add generic get block function 2019-10-02 05:51:59 -04:00
Ken Bannister
5eaa51e426 net/nanocoap: remove unused function 2019-10-02 05:51:59 -04:00
Ken Bannister
efb75c5c4c net/coap: improve slicer to block helper 2019-10-02 05:51:59 -04:00
Ken Bannister
dae9c4ab89 net/nanocoap: use coap_opt_add_uint() and remove unused 2019-10-02 05:51:59 -04:00
Ken Bannister
233dd31e17 net/nanocoap: add generic uint block option 2019-10-02 05:51:59 -04:00
Martine Lenders
aab312e8df
Merge pull request #11958 from miri64/emcute/fix/length-calculation
emcute: fix length field calculation
2019-10-01 09:29:58 +02:00
Martine Lenders
04f59d6609 gnrc_sixlowpan_frag_vrb: re-use now unused super::dst for out_dst 2019-09-30 12:46:15 +02:00
Martine Lenders
45f7966364 gnrc_sixlowpan_frag_vrb: fix for draft update
Due to some changes to the minimal forwarding draft and in preparation
for Selective Fragment Recovery some changes to the VRB API were
needed. Now the index of a VRB entry is only (L2 src, tag) not as
before (L2 src, L2 dst, length, tag).

I know that the current `rbuf_base` causes waste, as all the fields not
used by the new index are effectively not used by the VRB. I'd like to
fix that however in a later change, since that also requires some
modifications of the classic reassembly buffer, and thus would
complicate the review and testing of the change.

Sources for the index change:
- https://tools.ietf.org/html/draft-ietf-6lo-minimal-fragment-04#section-1
- https://mailarchive.ietf.org/arch/browse/6lo/?gbt=1&index=DLCTxC2X4bRNtYPHhtEkavMWlz4
2019-09-29 18:31:43 +02:00
Martine Lenders
e9ff46b2ea gnrc_sixlowpan_frag_rb: unify naming scheme 2019-09-28 12:11:54 +02:00
Martine Lenders
178f4af108 gnrc_sixlowpan_frag_rb: remove legacy defines 2019-09-28 12:07:24 +02:00
Martine Lenders
972e4938bc gnrc_sixlowpan_frag_rb: use existing name scheme for private functions 2019-09-28 11:51:18 +02:00
Martine S. Lenders
49bd8678ed gnrc_sixlowpan_frag_rb: remove public around former private functions 2019-09-28 11:51:18 +02:00
Martine S. Lenders
ec495528fe gnrc_sixlowpan_frag: move private RB functions to RB module 2019-09-28 11:51:18 +02:00
Martine S. Lenders
b5545fe334 gnrc_sixlowpan: include reassembly buffer only where needed 2019-09-27 21:11:36 +02:00
Martine S. Lenders
1f7770da5c gnrc_sixlowpan_frag: move public rbuf functions to their own module 2019-09-27 19:09:52 +02:00
9e65405a68
Merge pull request #12309 from haukepetersen/fix_skald_develhelpbuild
ble/skald: remove broken assert in init()
2019-09-26 22:44:55 +02:00
Martine Lenders
062bc732ea
Merge pull request #11299 from llueder/ndp_cpp_compliant
net/ndp: make addr array ptr c++ compliant
2019-09-26 22:34:45 +02:00
Lasse Lueder
8a86ea4a4b use ndp_opt_rdnss_impl_t to access addresses 2019-09-26 22:08:49 +02:00
Hauke Petersen
1871c0cb85 ble/skald: remove broken assert in init() 2019-09-26 22:07:23 +02:00
benpicco
e942f86837
Merge pull request #11056 from kb2ma/coap/pkt_api_block_write
net/gcoap: add/use Packet API Block implementation
2019-09-24 21:43:33 +02:00
Simon Brummer
fdda22c200 gnrc_tcp: allow unknown options 2019-09-24 20:01:40 +02:00
Sören Tempel
30e4823e94 asymcute: don't make the assumption that req->arg is non-NULL
This fixes a denial of service where an attacker would be able to cause
a NULL pointer dereference by sending a spoofed packet. This attack only
requires knowledge about pending message ids.
2019-09-24 12:00:12 +02:00
Martine Lenders
3a4d1f9bb1
Merge pull request #12281 from aabadie/pr/ci/coccinelle_fix_remaining
tools/ci: fix remaining errors reported by coccinelle static check
2019-09-20 14:22:09 +02:00
Martine Lenders
440b2614b5
Merge pull request #12274 from miri64/gnrc_ipv6/fix/scan-build
gnrc_ipv6: fix scan-build errors
2019-09-20 09:35:40 +02:00
caf48cfb2d
sys/net/lwmac: remove not needed pkt pointer check 2019-09-20 09:01:08 +02:00
Martine S. Lenders
66fa240e9a gnrc_ipv6: fix scan-build errors 2019-09-20 08:59:55 +02:00
benpicco
7a818f0433
Merge pull request #12249 from nmeum/pr/gnrc_tcp_option_length_access
gnrc_tcp: check if option length field is present before accessing it
2019-09-17 23:22:53 +02:00
Martine Lenders
51ef1c997d gnrc_ipv6: use fragmentation if available 2019-09-17 18:55:18 +02:00
Martine Lenders
c2c3216c16 gnrc_ipv6_ext_frag: Initial import of IPv6 fragmentation 2019-09-17 18:55:18 +02:00
Sören Tempel
e5503d62bf gnrc_tcp: check if option length field is present before accessing it
TCP options have up to three fields (kind, length, value). The
current code only checks for the presence of the first field. Before
accessing the second field (length) the code must ensure that a length
field is even present.
2019-09-16 21:13:51 +02:00
benpicco
018c15ae0c
Merge pull request #12253 from nmeum/pr/gnrc_tcp_option_length_check
gnrc_tcp: Always ensure that option->length doesn't exceed opt_left
2019-09-16 21:02:52 +02:00
Martine Lenders
4905a1ad49 gnrc_ipv6_ext: use fragment reassembly if available 2019-09-16 19:13:18 +02:00
Martine Lenders
f4b8ba32f3 gnrc_ipv6_ext_frag: Initial import of IPv6 reassembly 2019-09-16 19:13:18 +02:00
Sören Tempel
463c1212c2 gnrc_tcp: Always ensure that option->length doesn't exceed opt_left 2019-09-16 17:52:25 +02:00
Martine S. Lenders
1ca05f0c08 gnrc_netif_ethernet: fix debug output for received packet
A received packet is outputted in DEBUG _after_ it was already parsed,
but with a reference to the already parsed header. The result is that
there can be some garbage in the output and the packet is not dumped in
total. As without parsing we do not have access to the header yet, we
use the `gnrc_netif_addr_to_str()` helper function instead of parsing
the destination address by hand.
2019-09-16 14:01:16 +02:00
Martine Lenders
1dcf88efb2
Merge pull request #12245 from nmeum/pr/gnrc_tcp_unknown_option
gnrc_tcp: abort on unknown option
2019-09-16 13:01:01 +02:00
Martine Lenders
56e6887a95
Merge pull request #12079 from nmeum/pr/gnrc_tcp_gnrc_pktbuf_add
gnrc_tcp: Fix invocation of gnrc_pktbuf_add
2019-09-16 12:41:57 +02:00
Sören Tempel
9764697a3b gnrc_tcp: abort on unknown option 2019-09-16 12:18:24 +02:00
benpicco
bf2aaa1a5d
Merge pull request #12049 from Sizurka/fix-asymcute-reconnect
asymcute: Reset keepalive counter on connection ACK
2019-09-12 15:55:11 +02:00
Ken Bannister
1621cc1d39
Merge pull request #12075 from kb2ma/coap/options_get_opaque
net/nanocoap: get option bytes
2019-09-12 09:00:27 -04:00
Martine Lenders
8911c514fd
Merge pull request #10951 from miri64/gnrc_ipv6_nib/enh/abr-helpers
shell/sc_gnrc_ipv6_nib: extend for ABR
2019-09-12 07:34:09 +02:00
Martine Lenders
b77e08652e gnrc_ipv6_nib: provide ABR iteration and print function 2019-09-11 23:51:20 +02:00
Kevin "Tristate Tom" Weiss
d6af98b5b7
Merge pull request #11835 from miri64/gnrc_sixlowpan_frag/new/stats
gnrc_sixlowpan_frag_stats: initial import of frag statistics
2019-09-11 12:01:22 +02:00
Ken Bannister
39eddce078 net/nanocoap: add function to retrieve opaque option 2019-09-11 05:40:14 -04:00
Martine Lenders
dca3408167 gnrc_sixlowpan_frag_stats: initial import of frag statistics 2019-09-11 10:30:29 +02:00
Marian Buschsieweke
b87ab96d17
Merge pull request #10661 from miri64/gnrc_netif_hdr/enh/netif_setter
gnrc_netif_hdr: add setter for netif
2019-09-10 16:14:28 +02:00
Martine S. Lenders
cee1b7296d gnrc_icmpv6_echo: use gnrc_netif_hdr_set_netif() also for loopback 2019-09-10 12:37:32 +02:00
Sebastian Meiling
9f5951d216
Merge pull request #10214 from bergzand/pr/nanocoap/flags_uint32t
nanocoap: change method flag type to uint16_t
2019-09-09 12:33:17 +03:00
Martine Lenders
58d621611f
Merge pull request #12175 from shr70/icmpv6_error_fix
[gnrc_icmpv6_error] Fixed multicast detection
2019-09-09 11:32:31 +02:00
Sebastian Meiling
c78ae0e33c
Merge pull request #12074 from kb2ma/coap/options_iterate
net/nanocoap: iterate options
2019-09-09 10:51:23 +03:00
bde253cca3
gcoap: use coap_method_flags_t 2019-09-09 09:40:14 +02:00
4d399bf444
nanocoap: change method flag type to uint32_t 2019-09-09 09:40:14 +02:00
steffen
485dbd1fda [gnrc_icmpv6_error] Fixed multicast detection
before this commit the src address was checked for multicast, but the dst address should be checked. Therefore udp multicast packets would be flooded back to the src as ICMPv6 error, as not all nodes had a UDP receiver registered.
2019-09-05 19:22:43 +02:00
Simon Brummer
351220e884 gnrc_tcp - Release pakets on failed gnrc_netapi_send() 2019-08-31 11:16:55 +02:00
benpicco
837f99e757
Merge pull request #12084 from nmeum/pr/gnrc_tcp_minlen
gnrc_tcp: add minimum length check to _receive
2019-08-30 17:37:20 +02:00
benpicco
7d3f20b1a8
Merge pull request #12088 from nmeum/pr/gnrc_tcp_option_overflow
gnrc_tcp: fix integer underflow in option parser
2019-08-30 17:34:39 +02:00
Martine Lenders
3671f69a43
gnrc_rpl: use gnrc_netif_hdr_set_netif() 2019-08-29 14:51:46 +02:00
Martine Lenders
685f7f6b38
gnrc_lwmac: use gnrc_netif_hdr_set_netif() 2019-08-29 14:51:46 +02:00
Martine Lenders
3c105d8b33
gnrc_gomach: use gnrc_netif_hdr_set_netif() 2019-08-29 14:51:45 +02:00
Hauke Petersen
7f7993f1d6 bluetil/addr: fix byte ordering in addr_from_str() 2019-08-28 16:48:42 +02:00
Hauke Petersen
b7b5791930 sys/bluetil/addr: fix byte ordering in print funcs 2019-08-28 16:48:42 +02:00
Hauke Petersen
218b547b3c net/bluetil/addr: add addr swapped copy function 2019-08-28 16:48:41 +02:00
Hauke Petersen
9df583457f net/l2util: fix addr conversion for BLE 2019-08-28 16:48:41 +02:00
Hauke Petersen
504acc5097 net/l2util: add nimble opt for addr resolution 2019-08-28 16:48:03 +02:00
Juan I Carrano
a6e26597c7
Merge pull request #11987 from miri64/nhdp/doc/deprecate
nhdp: deprecate module
2019-08-28 15:45:00 +02:00
Martine S. Lenders
056bd35e6c nhdp: deprecate module 2019-08-28 06:22:14 +02:00
Sören Tempel
7f3415e91d gnrc_tcp: Fix invocation of gnrc_pktbuf_add
The size parameter should specify the length of the given data.
2019-08-27 10:19:40 +02:00
Sören Tempel
c9358b9217 gnrc_tcp: fix integer underflow in option parser 2019-08-27 10:18:15 +02:00
Sören Tempel
0fff1b35ec gnrc_tcp: add minimum length check to _receive 2019-08-26 16:45:46 +02:00