Derek Hageman
18910cf4e2
asymcute: Reset keepalive counter on connection ACK
...
When a keepalive timeout occurs keepalive_retry_cnt remains zero,
so when the connection is re-established _on_keepalive_evt will
immediately disconnect instead of actually sending a keepalive ping.
The sequence looks like:
1. _on_connack: start con->keepalive_timer
2. Server does not respond to keepalive pings
3. _on_keepalive_evt: con->keepalive_retry_cnt reaches zero
4. Connection torn down and ASYMCUTE_DISCONNECTED sent to application
5. Application starts reconnection
6. _on_connack: start con->keepalive_timer again
7. First _on_keepalive_evt: con->keepalive_retry_cnt is still zero
8. Repeat from 4.
So this simply resets keepalive_retry_cnt in _on_connack when
the keepalive timer is restarted. It's a new connection, so
resetting the keepalive retry counter make senses regardless.
Signed-off-by: Derek Hageman <hageman@inthat.cloud>
2019-08-20 17:23:05 -06:00
benpicco
20dec77e39
Merge pull request #11999 from nmeum/pr/gnrc_tcp_mark_update
...
net/gnrc/tcp: fix invalid read
2019-08-20 15:37:17 +02:00
benpicco
f483988ae9
Merge pull request #12001 from nmeum/pr/gnrc_tcp_memory_leak
...
gnrc_tcp: Fix memory leak, potential DOS
2019-08-19 14:42:13 +02:00
Sebastian Meiling
226ace7bb6
Merge pull request #9852 from bergzand/pr/rpl/fix_debug_hdrs
...
gnrc_rpl: remove DEBUG from header files
2019-08-16 11:27:48 +02:00
b33ee93d22
gnrc_rpl: remove DEBUG from header files
...
This conflicts with the DEBUG setting in C files that include these
headers making it impossible to enable the DEBUG setting in these C
files.
2019-08-16 10:11:41 +02:00
Sören Tempel
c6df2064af
gnrc_tcp: Fix memory leak
2019-08-12 23:14:15 +02:00
Sören Tempel
9e91d21625
net/gnrc/tcp: fix uninitialized memory access
...
From the gnrc_pktbuf_mark documentation:
It's not guaranteed that `result->data` points to the
same address as the original `pkt->data.
Thus it should be necessary to update the `hdr` pointer.
2019-08-12 22:04:35 +02:00
Francisco
fde50372c3
Merge pull request #11837 from miri64/gnrc_netif/enh/inter-tx-wait
...
gnrc_netif: allow for wait of minimum time between sends
2019-08-09 10:53:26 +02:00
Martine Lenders
488c47cbf3
gnrc_netif: allow for wait of minimum time between sends
2019-08-09 10:21:42 +02:00
Kevin "Bear Puncher" Weiss
10a2794c8e
Merge pull request #11970 from miri64/gnrc_ipv6/fix/check-source-for-send
...
gnrc_ipv6: check validity of preconfigured source on send
2019-08-08 13:39:47 +02:00
Martine S. Lenders
7f2cc4f0b3
gnrc_ipv6: check validity of preconfigured source on send
...
If an address was pre-configured by the upper layer its validity is
currently ignored. It is neither checked if the address is on the
interface at all nor is it checked if it is valid.
This change provides a fix for that by checking both facts.
2019-08-08 13:16:28 +02:00
Hauke Petersen
02df6ab13f
Merge pull request #11000 from miri64/gnrc_sixlowpan_frag/new/vrb
...
gnrc_sixlowpan_frag: initial import of the VRB
2019-08-07 17:33:01 +02:00
Martine Lenders
1f1ff16e3c
gnrc_sixlowpan_frag: include VRB in normal GC
2019-08-07 16:19:36 +02:00
Martine Lenders
26a526eaee
gnrc_sixlowpan_frag: initial import of the VRB
...
VRB = virtual reassembly buffer
2019-08-07 16:18:19 +02:00
Benjamin Valentin
e8dc1119b8
sys: make use of ARRAY_SIZE macro
2019-08-06 19:43:54 +02:00
e352b54a9b
net/gnrc/tcp: remove duplicate net_gnrc_tcp group definitions
2019-08-05 16:57:37 +02:00
f922df8c99
net/gnrc/sock: remove duplicate net_gnrc_sock group definition
2019-08-05 16:57:37 +02:00
Ken Bannister
c8e87e7854
Merge pull request #11787 from miri64/gcoap/enh/backoff-config
...
gcoap: allow for retransmission backoff to be turned off
2019-08-02 06:40:07 -04:00
Ken Bannister
28317019fc
Merge pull request #11784 from miri64/gcoap/fix/ack-variance-0
...
gcoap: don't call random_uint32_range() when COAP_ACK_VARIANCE=0
2019-08-02 05:10:45 -04:00
Ken Bannister
b5200e96a7
Merge pull request #11024 from kb2ma/coap/add_block_helpers
...
net/nanocoap: Buffer API Block helper functions
2019-07-31 12:41:25 -04:00
Marian Buschsieweke
d4d5f27b72
Merge pull request #11916 from miri64/gnrc_icmpv6_echo/enh/use-netif_hdr-setter
...
gnrc_icmpv6_echo: use gnrc_netif_hdr_set_netif()
2019-07-30 19:48:43 +02:00
Ken Bannister
64b4e0ad2d
net/nanocoap: add block slicer init function
2019-07-30 13:10:10 -04:00
Ken Bannister
a6f919ef3e
net/nanocoap: refactor block2_finish()
2019-07-30 13:10:10 -04:00
Ken Bannister
86edea81be
net/nanocoap: use block init helper internally
2019-07-30 13:10:10 -04:00
Ken Bannister
69efaa1d56
net/nanocoap: add block init helper function
2019-07-30 13:10:10 -04:00
Ken Bannister
f4df9d79e9
Merge pull request #11002 from kb2ma/coap/block_finish_proto
...
net/nanocoap: Buffer API Block implementation
2019-07-30 12:49:12 -04:00
Leandro Lanzieri
a9ab9d37e2
Merge pull request #11765 from kb2ma/coap/encode_resources
...
net/gcoap: add/publish link format attributes for a resource
2019-07-27 22:36:33 +02:00
Ken Bannister
d481ca9da7
net/gcoap: add selectable function to write a link
2019-07-27 07:09:40 -04:00
Martine Lenders
44410a4aeb
Merge pull request #11918 from miri64/gnrc_ipv6/enh/use-netif_hdr-setter
...
gnrc_ipv6: use gnrc_netif_hdr_get/set_netif()
2019-07-26 12:00:39 +02:00
Martine S. Lenders
e865f4e34c
gnrc_icmpv6_error: use gnrc_netif_hdr_get/set_netif()
2019-07-25 15:52:14 +02:00
Martine S. Lenders
4231b7cd38
gnrc_ndp: use gnrc_netif_hdr_set_netif()
2019-07-25 15:48:14 +02:00
Martine S. Lenders
2afa6795ef
gnrc_ipv6: use gnrc_netif_hdr_get_netif()
2019-07-25 15:48:14 +02:00
Martine S. Lenders
7b43a8f9d5
gnrc_ipv6: use gnrc_netif_hdr_set_netif()
2019-07-25 15:45:44 +02:00
Martine S. Lenders
47fdebc938
gnrc_icmpv6_echo: use gnrc_netif_hdr_set_netif()
2019-07-25 15:20:26 +02:00
Martine S. Lenders
4a38dabc70
gnrc_netif_ieee802154: use gnrc_netif_hdr_set_netif()
2019-07-25 14:56:47 +02:00
Martine S. Lenders
006f10c2af
gnrc_netif_ethernet: use gnrc_netif_hdr_set_netif()
2019-07-25 14:15:37 +02:00
Ken Bannister
9dce54b54b
net/nanocoap: refactor block option control use
2019-07-22 05:42:08 -04:00
Ken Bannister
4311f17e81
net/nanocoap: refactor block option put
2019-07-22 05:42:08 -04:00
Aiman Ismail
a1a6dcd5ae
sys/net: add credman (D)TLS credential manager
2019-07-19 13:56:21 +02:00
36f533e7ae
Merge pull request #11839 from kb2ma/nanocoap/option_func_doc
...
net/nanocoap: document internal option functions
2019-07-18 23:06:54 +02:00
Ken Bannister
64ba8e4ea9
net/nanocoap: document internal option functions
2019-07-18 05:21:40 -04:00
Martine Lenders
60c26648fe
Merge pull request #11766 from nmeum/pr/gnrc_tftp_min_len
...
gnrc_tftp: Add minimum packet length check
2019-07-16 14:39:48 +02:00
6c02521591
nanocoap: make coap_get_block2() actually fill struct
2019-07-05 15:29:58 +02:00
de244e6679
gnrc/pktbuf: remove obsolete sys/uio.h include
...
This was previously used by gnrc_pktbuf_get_iovec() for the definitions
of "struct iovec", which has been removed a while ago.
2019-07-04 16:12:57 +02:00
Hauke Petersen
eb50d4704a
net/emcute: make cli ID conform to standard
2019-07-04 11:04:22 +02:00
Hauke Petersen
785f59fb7f
net/asymcute: make cli ID len conform to standard
2019-07-04 11:03:37 +02:00
Kevin "Bear Puncher" Weiss
6176878153
Merge pull request #11786 from miri64/gnrc_tftp/fix/set-dst-port-on-server-init
...
gnrc_tftp: set port on server init
2019-07-04 08:49:31 +02:00
Martine Lenders
16f0751102
Merge pull request #11745 from miri64/gnrc_ipv6/fix/rm-dangerous-dup
...
gnrc_ipv6: remove obsolete and harmful reception code
2019-07-03 23:50:06 +02:00
Martine Lenders
0cc4c50919
Merge pull request #11780 from miri64/gnrc_pktbuf/cleanup/rm-duplicate_upto
...
gnrc_pktbuf: remove gnrc_pktbuf_duplicate_upto
2019-07-03 17:44:08 +02:00
Martine S. Lenders
1c946a1af4
gnrc_tftp: set port on server init
2019-07-03 16:49:43 +02:00
Martine S. Lenders
c31c9ed216
gcoap: allow for retransmission backoff to be turned off
2019-07-03 16:35:48 +02:00
Martine S. Lenders
1bde141697
gcoap: don't call random_uint32_range() when COAP_ACK_VARIANCE=0
...
`COAP_ACK_VARIANCE` is a configurable macro, so when it is 0, the
[precondition for `random_uint32_range()`][1] is not held.
[1]: https://doc.riot-os.org/group__sys__random.html#gab6ee09e1e56df3cc78acd1fbf97bfb24
2019-07-03 15:45:45 +02:00
Martine S. Lenders
b83430aa62
gnrc_pktbuf: remove gnrc_pktbuf_duplicate_upto
...
The removal of this function was already announced for the 2019.04
release. So it is safe to remove it.
2019-07-03 15:09:18 +02:00
Martine S. Lenders
7e70bf3ac1
cord_epsim: replace gcoap_req_send2()
2019-07-03 15:02:22 +02:00
Martine S. Lenders
0579ef952e
cord_ep: replace gcoap_req_send2()
2019-07-03 15:02:15 +02:00
Martine S. Lenders
c9179a26c8
gcoap: replace internal references to gcoap_req_send2()
...
`gcoap_req_send2()` is deprecated and was replaced with
`gcoap_req_send()`.
2019-07-03 15:00:06 +02:00
Martine S. Lenders
ea449f3f9e
gnrc_ipv6: remove obsolete and harmful reception code
...
When reworking the reception of IPv6 packets I reset a previously set
`ipv6` snip as follows when the IPv6 extension handler returns a
packet (see first hunk of this commit):
```C
ipv6 = pkt->next->next
```
With `gnrc_ipv6_ext` this makes *somewhat* sense, `pkt->next` was
previously equal to `ipv6` and after the function call `pkt->next`
is the marked extension header, while `pkt->next->next` is the IPv6
header. However, since `ipv6` is already write-protected i.e.
`ipv6->users == 1` (see ll. 665-675), any additional call of
`gnrc_pktbuf_start_write()` [won't][start-write-doc] duplicate the
packet. In fact, the only `gnrc_pktbuf_start_write()` in
`gnrc_ipv6_ext` is used to send the *result* to the subscribers of that
extension header type, leaving the original packet unchanged for the
caller. As such `ipv6` remains the pointer to the IPv6 header whether
we set it in the line above or not. So we actually don't need that
line.
However, the extension header handling also returns a packet when
`gnrc_ipv6_ext` is not compiled in. In that case it is just a dummy
define that returns the packet you give provide it which means that
this still holds true: `pkt->next == ipv6`.
So setting `ipv6` in this case is actually harmful, as `ipv6` now
points to the NETIF header [following the IPv6 header][pkt-structure]
in the packet and this causes the `user` counter of that NETIF header
`hdr` to be decremented if `hdr->users > 1` in the write-protection I
removed in hunk 2 of this commit:
```C
/* pkt might not be writable yet, if header was given above */
ipv6 = gnrc_pktbuf_start_write(ipv6);
if (ipv6 == NULL) {
DEBUG("ipv6: unable to get write access to packet: dropping it\n");
gnrc_pktbuf_release(pkt);
return;
}
```
But as we already established, `ipv6->users` is already 1, so we don't
actually need the write protection here either.
Since the packet stays unchanged after the `ipv6` snip, we also don't
need to re-search for `netif_hdr` after the other two lines are
removed.
[start-write-doc]: https://doc.riot-os.org/group__net__gnrc__pktbuf.html#ga640418467294ae3d408c109ab27bd617
[pkt-structure]: https://doc.riot-os.org/group__net__gnrc__pkt.html#ga278e783e56a5ee6f1bd7b81077ed82a7
2019-07-03 14:44:03 +02:00
Martine S. Lenders
7ba928faa3
gnrc_tftp: make it working again with link-local addresses
2019-07-03 14:04:26 +02:00
Martine Lenders
2fce0950bf
gnrc_tftp: set dst_port when duplicated data received
2019-07-03 12:51:10 +02:00
Martine Lenders
3d9c7ee5de
gnrc_tftp: set source port for server
2019-07-01 22:56:42 +02:00
Martine Lenders
5ec0b1609a
gnrc_tftp: initialize unititialized 'tftp_context_t' values to 0
2019-07-01 22:55:31 +02:00
Sören Tempel
e8d0fb7685
gnrc_tftp: Add minimum packet length check
...
Fixes #10927
2019-07-01 13:49:25 +02:00
Sebastian Meiling
57361470dd
Merge pull request #11737 from nmeum/pr/gnrc_tftp_mode_compare
...
gnrc_tftp: Fix out-of-bounds memory access when comparing modes
2019-07-01 09:26:03 +02:00
Jose Alamos
ca8c78116f
drivers/sx127x: add NETOPT_RX_SYMBOL_TIMEOUT setter
2019-06-27 15:43:50 +02:00
Jose Alamos
268e6df950
drivers/sx127x: add NETOPT_RANDOM option handling
2019-06-27 15:43:50 +02:00
Jose Alamos
77162b8c6f
drivers/sx127x: add NETOPT_SYNCWORD option handling
2019-06-27 15:43:50 +02:00
Sören Tempel
a26942632a
gnrc_tftp: Fix out-of-bounds memory access when comparing modes
2019-06-27 10:21:42 +02:00
7b8612b38d
sys/net: add netopt options for lorawan
2019-06-25 13:53:25 +02:00
Martine Lenders
3ee75c3ca9
gnrc_sixlowpan_iphc: assure ctx != NULL for dst compression
...
For the source address compression it was already done the same way in
12bcc46f15
2019-06-20 16:18:23 +02:00
Martine Lenders
3edb52de0c
gnrc_rpl_dodag: remove new_best assignment at initialization
...
The variable is without usage reassigned with `dodag->parent` below.
2019-06-20 16:18:23 +02:00
Martine Lenders
fa95cc8090
gnrc_ipv6_nib: assure netif != NULL in route info callback
2019-06-20 16:18:23 +02:00
Martine Sophie Lenders
a09072c93d
gnrc_ipv6_nib: add address from netif to address validation timer
...
The `addr` parameter of the NIB's `_handle_dad()` function can come
from anywhere (e.g. in the fallback to classic SLAAC the destination
address of the IP header is used), so putting that pointer in a timer
is not a good idea. Instead we use the version of the address that is
stored within the interface.
2019-06-18 12:05:07 +02:00
Martine Sophie Lenders
f5f8261b1c
gnrc_ipv6_nib: add debug messages for DAD + 6Lo
2019-06-18 11:48:04 +02:00
Martine Sophie Lenders
484526533d
gnrc_ipv6_nib/SLAAC: add debug message for address validation
2019-06-18 11:47:47 +02:00
Leandro Lanzieri
b9c1146e90
sys/net/sock_util: Accept null pointers in urlsplit
2019-06-12 10:03:11 +02:00
Martine Lenders
7e7e17c33f
Merge pull request #11640 from haukepetersen/add_bluetil_addrfromstr
...
sys/bluetil: add bluetil_addr_from_str()
2019-06-06 12:09:12 +02:00
Hauke Petersen
665b1d6528
sys/bluetil: add bluetil_addr_from_str()
2019-06-06 11:42:55 +02:00
Martine Lenders
731ef19970
gnrc_ipv6_ext: fix packet snip type
...
The `pkt->type` of an extension header should be
`GNRC_NETTYPE_IPV6_EXT` so it can be parsed properly as an extension
after building.
2019-06-04 10:47:02 +02:00
Cenk Gündoğan
e34a133428
Merge pull request #11560 from benpicco/rpl/of-api-update
...
RPL: API update suggestions
2019-05-29 15:44:39 +02:00
42c1da8171
gnrc_rpl: update OF API
...
- dodag->parents already points to the preferred parent, so give dodag to calc_rank directly
- remove unused which_parent function
2019-05-29 15:11:18 +02:00
Cenk Gündoğan
3f4259af07
Merge pull request #11061 from miri64/gnrc_sixlowpan_frag/new/hint
...
gnrc_sixlowpan_frag: Initial import of a fragment size hint feature
2019-05-28 23:09:15 +02:00
Martine Lenders
2534cfb3fa
gnrc_sixlowpan_frag: Initial import of a fragment size hint feature
...
This allows for sending of fragments smaller than the restrictions set
by the link-layer PDU. E.g. to put some slack for IPHC into the first
fragment (see https://tools.ietf.org/html/draft-ietf-6lo-fragment-recovery-02#section-4.1 ).
2019-05-28 21:03:51 +02:00
Martine Lenders
a8c81debf8
gnrc_sixlowpan_frag: use rbuf base class whenever possible
2019-05-28 18:07:42 +02:00
Martine Lenders
5e7803d506
gnrc_sixlowpan_frag: add datagram size to base type
2019-05-28 18:07:42 +02:00
Martine Lenders
52e4247798
gnrc_sixlowpan_frag: introduce reassembly buffer base class
2019-05-28 18:07:42 +02:00
Martine Lenders
495eaa36a6
gnrc_sixlowpan_frag: remove unnecessary type indirection
...
The members of `rbuf_t` and `gnrc_sixlowpan_rbuf_t` are now identical
so we can remove the internal type.
2019-05-28 18:07:42 +02:00
Martine Lenders
8cc5d94956
gnrc_sixlowpan_frag: add arrival time to public type
...
The arrival time is also needed for the VRB's garbage collection.
2019-05-28 18:07:42 +02:00
Martine Lenders
b84e496563
gnrc_sixlowpan_frag: add intervals to public type
...
The fragment intervals are also required by the VRB, so make them part
of the public representation of a reassembly buffer.
2019-05-28 18:07:42 +02:00
Martine Lenders
a3061ab2cc
gnrc_sixlowpan_frag: expose fragment interval type
...
For the [VRB] I also need to track which the intervals of the fragments
already received (mostly for finding out when I am able to get rid of a
VRB entry, see [this conversation][VRB entry removal]), so to be able to
incorporate it into the common type for both reassembly buffer and VRB I
need to expose that type first.
[VRB]: https://tools.ietf.org/html/draft-ietf-lwig-6lowpan-virtual-reassembly-00
[VRB entry removal]: https://mailarchive.ietf.org/arch/msg/6lo/bTm2REo4PpVcMFH04mF_SlPvS_M
2019-05-28 18:07:41 +02:00
Martine Lenders
8fe12bc82c
Merge pull request #11021 from miri64/gnrc_sixlowpan_frag/enh/multiple-send
...
gnrc_sixlowpan_frag: allow send of multiple datagrams simultaneously
2019-05-27 11:54:26 +02:00
Martine Lenders
93050d29c0
gnrc_sixlowpan_frag: unify common operations
2019-05-27 10:35:31 +02:00
Martine Lenders
04472d3fbe
gnrc_sixlowpan_frag: reorder stack variables for better stack usage
2019-05-27 10:35:31 +02:00
Martine Lenders
b6f19c0bcb
gnrc_sixlowpan_frag: allow send of multiple datagrams simultaneously
2019-05-27 10:35:31 +02:00
4d052a6921
Merge pull request #11580 from miri64/gnrc_ipv6_ext/fix/nh-after-change
...
gnrc_ipv6_ext: don't read from `pkt->data` after `_demux()`
2019-05-26 00:40:37 +02:00
Martine Lenders
ea1708b402
gnrc_ipv6_ext: don't read from pkt->data
after _demux()
...
`_demux()` might change `pkt->data` in all kind of ways (moving it due
to `gnrc_pktbuf_mark()`, though unlikely; releasing it, because e.g. it
starts with a fragment header that marks a fragmented packet containing
only one fragment, etc.) so accessing the pointer *after* calling
`_demux()` is somewhat playing with fire. This change avoids this by
storing the value of `ext_hdr->nh` (all we are interested in here) in a
temporary variable that then is used to set the out-parameter `nh`.
`protnum` needs to be unchanged before the call to `_demux()` as it was
set by the previous iteration and determines what extension header
actually is handled.
2019-05-24 22:11:22 +02:00
Martine Lenders
7e26a22723
gnrc_sixlowpan_frag: fix timeout config macro name
2019-05-24 17:39:35 +02:00
Cenk Gündoğan
650ee83e90
Merge pull request #11442 from miri64/gnrc_sixlowpan_frag/enh/aggressive-config
...
gnrc_sixlowpan_frag: make aggresive override configurable
2019-05-24 17:25:20 +02:00
Martine Lenders
7833141af1
gnrc_mac: rename directory in line with other modules
2019-05-09 14:46:35 +02:00
Ken Bannister
8aa5258ba7
Merge pull request #11445 from miri64/gcoap/fix/rm-deprecated
...
gcoap: remove deprecated function gcoap_req_send()
2019-05-03 13:44:02 -04:00
0ec9c57b2b
add copyrights from IOTPUSH project
2019-05-02 12:09:37 +02:00