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

6477 Commits

Author SHA1 Message Date
Ken Bannister
0c5706969c net/nanocoap: refactor Options API doc 2019-09-14 10:56:38 -04:00
Ken Bannister
55c18947bd net/nanocoap: doc emphasize application API 2019-09-14 08:13:50 -04:00
Juan I Carrano
9cf1da9f04
Merge pull request #11935 from fjmolinas/pr_schedstatistics_module
sys: add schedstatistics module
2019-09-13 15:09:12 +02:00
Francisco Molina
1caf6610cb sys: add schedstatistics module 2019-09-13 11:37:44 +02:00
benpicco
66ce29d94c
Merge pull request #12051 from OTAkeys/fix/isotp
can/isotp: fix closing connection and improve flow control handling
2019-09-12 23:01:58 +02:00
Schorcht
72eb93626a sys/auto_init: SAUL support for PCA9685 PWMs 2019-09-12 19:13:20 +02:00
Juan I Carrano
e9ca2114ee
Merge pull request #12204 from cladmi/pr/pthread/enable_avr
pthread_cond.h: use 'sys/types.h' value of 'clockid_t' for avr. Enables pthread on AVR.
2019-09-12 16:41:59 +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
Martine Lenders
af45ebecec
Merge pull request #12208 from pokgak/wolfssl_pkg_desc
wolfssl: improve documentation
2019-09-12 15:11:40 +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
Aiman Ismail
083c8f79c0 net/dtls: add reference to wolfssl pkg 2019-09-12 14:58:16 +03: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
1656162835 shell_commands: gnrc_ipv6_nib: remove unnecessary cast 2019-09-11 23:51:20 +02:00
Martine Lenders
28ac07d8e5 shell/sc_gnrc_ipv6_nib: extend for ABR
Adds functionality to list and edit authoritative border router list.
2019-09-11 23:51:20 +02:00
Martine Lenders
b77e08652e gnrc_ipv6_nib: provide ABR iteration and print function 2019-09-11 23:51:20 +02:00
dd99cea622
usbus: rename setup request to control request
This commit changes the name of the requests over the control endpoints
to control requests instead of setup requests. This is a terminology fix
to follow the USB specification more closely as technically only the
first stage of a control request is named setup which contains a setup
packet. The whole transfer is a control transfer.
2019-09-11 21:39:05 +02:00
benpicco
ca6009592f
Merge pull request #11781 from fjmolinas/pr_schedstatistics_refactor
core/schedstatistics: fix call to uninitialized xtimer
2019-09-11 20:11:55 +02:00
Gaëtan Harter
624957252e
pthread_cond.h: use 'sys/types.h' value of 'clockid_t' for avr
This enables 'pthread' support on arduino.

avr-libc C90 'time.h' does not include 'sys/types.h' as POSIX expects it.
However, the type previously defined conflicts with the one in
'cpu/atmega_common/avr_libc_extra/include/sys/types.h' when both are
included, so include 'sys/types.h'.

Maybe it should alway be included by 'time.h' but this
would need its specific review.
2019-09-11 18:25:10 +02:00
Juan I Carrano
00e0a1cf13
Merge pull request #12056 from JulianHolzwarth/pr/posix/pthread/small_insert_fix
sys/posix/pthread/pthread.c: fix thread count limiting in pthread_create()
2019-09-11 18:22:54 +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
0ab0a19871 shell_commands: add command to get 6lo frag statistics 2019-09-11 10:30:29 +02:00
Martine Lenders
dca3408167 gnrc_sixlowpan_frag_stats: initial import of frag statistics 2019-09-11 10:30:29 +02:00
Martine Lenders
0c24bfcd0d shell_commands: fix ping6 response check for multicast 2019-09-10 21:50:23 +02:00
benpicco
720db1ab1e
Merge pull request #11262 from OTAkeys/fix/can_crash
can: fix a race condition with tx_list
2019-09-10 19:28:14 +02:00
Juan Carrano
72f934f13d sys/arduino: work around llvm-ar bug.
llvm-ar behaves weidly when creating thin archive. This only manifests
itself when using arduino sketches as these are built from the "bin"
directory.

Specifically, given a directory "m" and an object in "m/obj.o " an
invocation with CWD==m:

```
llvm-ar rcTs ../m.a obj.o
```

Will create a maformed archive. Binutils does not have any issue with this.

The following command, executed with CWD==m/.. works:

```
llvm-ar rcTs m.a m/obj.o
```

The trick used in this commit is to put the source files in a different
directory than the object files and compile from there.
2019-09-10 17:53:07 +02:00
francisco
3d62fa05b8 core/schedstatistics: refactor
- add init_schedstatistics function to be called after
  auto_init, that way xtimer_is init is called before
  the first call to xtimer_now
- register schedstatics code as a callback to be executed
  on each sched_run()
2019-09-10 17:07:54 +02:00
Martine Lenders
9e33c04e3d
Merge pull request #9404 from OTAkeys/pr/can_memarray
can: use memarray for pkt and router allocation
2019-09-10 16:28:31 +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
Javier FILEIV
ced8094e1a can_pm: if powered up by raw interface, fix sleeping timer. 2019-09-10 13:04:52 +02:00
Vincent Dupont
6bbb908d59 can/pkt: free pkt on bus off error 2019-09-10 13:04:52 +02:00
Vincent Dupont
d3fac6f5ac can/conn: use non-blocking function from timer interupts 2019-09-10 13:04:52 +02:00
Vincent Dupont
c9211f9c06 can: fix race condition in tx_list 2019-09-10 13:04:52 +02:00
Vincent Dupont
9207e6b446 can: use memarray for pkt and router allocation 2019-09-10 13:01: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
04d33973f4
sys/log: add colored logging module 2019-09-09 20:27:16 +02:00
88e07c06d2
Merge pull request #11367 from maribu/arm_early_stdio
cpu: Moved stdio_init() prior to periph_init() for ARM targets
2019-09-09 16:52:30 +03: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
Leandro Lanzieri
563a053bc1
Merge pull request #10983 from skullbox305/driver_ph_oem
drivers/ph_oem: support for Atlas Scientific pH OEM sensor
2019-09-09 10:18:49 +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
Ken Bannister
113dd645bf
Merge pull request #10193 from bergzand/pr/coap/include_rfc8428_rfc8132
coap: Update list of defines for "PATCH and FETCH Methods" and SenML
2019-09-08 19:14:40 +03:00
Kees Bakker
35c5869a2e
Merge pull request #12117 from maribu/arduino-println
sys/arduino: Extended Serial.print() / println()
2019-09-07 21:16:43 +02:00
Marian Buschsieweke
df27dbef7a
cpu: Moved stdio_init() into cpu_init()
- Removed stdio_init() from newlib's _init(), as this is too late in the boot
  process to allow DEBUG()ing during periph_init()
- Added stdio_init() to the various cpu_init() routines of the ARM CPUs just
  before periph_init()
2019-09-06 16:54:23 +02:00
JulianHolzwarth
d76bb689d6 sys/posix/pthread/pthread.c: pthread_create fix
The function insert returns KERNEL_PID_UNDEF now because pthread_create checks for it.
In pthread_create it checks now if thread_create returns a valid pid
2019-09-06 15:54:59 +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
Francisco Molina
1357f46c47 pkg/semtech-loramac: add uplink_counter get/set functions 2019-09-05 16:01:32 +02:00
7bd9e68867
nanocoap: Add method flags for rfc8132 2019-09-05 13:00:22 +02:00
c4e48ea5e0
coap: update defines for sen(s)ml format types 2019-09-05 12:59:45 +02:00
bf51f35838
coap: update defines for rfc8132
Update the list of defines for methods and response codes with the new
codes as defined in [rfc8132](https://tools.ietf.org/html/rfc8132)
2019-09-05 12:55:17 +02:00
Igor Knippenberg
89082a3eb2 sys/auto_init: Added auto initialization for pH OEM driver 2019-09-05 12:47:10 +02:00
Igor Knippenberg
61d0970939 drivers/saul: Added pH
- added device class SAUL_SENSE_PH in saul.h
- added stringification SAUL_SENSE_PH in saul_str.c
2019-09-05 12:47:10 +02:00
Gunar Schorcht
140987fc3a sys/shell: cleanup the heap command approach
Replaces the special heap command approach of the lpc_common module with a more general heap command approach. Module lpc_common was already removed with PR #2118. PR #2118 integrated cpu/lpc_common code in cpu/lpc2387. With PR #3530 special heap handling for cpu/lpc2387 was replaced by newlib memory management which uses _sbrk_r to allocate chunks from the heap. _sbrk_r uses _sheap and _eheap symbols that are defined in lpc2387.ld and can be used together with mallinfo function for heap statistics.
2019-09-05 09:18:46 +02:00
benpicco
f421cb7d9d
Merge pull request #12116 from maribu/arduino-millis
sys/arduino: Added millis()
2019-09-05 04:12:46 +02:00
Marian Buschsieweke
d4aeca7469
sys/arduino: Extended Serial.print() / println()
- Serial.print() and Serial.println() have been extended to support:
    - unsigned int
    - long
    - unsigned long
- The SerialFormat BIN has been implemented
- Serial.println(void) has been added
2019-09-04 21:36:20 +02:00
benpicco
7f487ac807
Merge pull request #12131 from brummer-simon/gnrc_tcp-release_after_failed_send
gnrc_tcp - Release pakets on failed gnrc_netapi_send()
2019-09-03 15:59:21 +02:00
Francisco Molina
5e1558ba57 shell/commands: fix, only accept proper pong response 2019-09-03 09:07:29 +02:00
Simon Brummer
351220e884 gnrc_tcp - Release pakets on failed gnrc_netapi_send() 2019-08-31 11:16:55 +02:00
Daniele Lacamera
5cb76e521b posix_socket: set sock for returned socket on accept() 2019-08-30 21:18:25 +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
Marian Buschsieweke
8cff47304b
sys/arduino: Make use of US_PER_MS in delay() 2019-08-29 13:57:56 +02:00
Marian Buschsieweke
27eca42f48
sys/arduino: Added millis()
Added arduino-compatilbe "unsigned long millis()"
2019-08-29 13:36:15 +02:00
Hauke Petersen
33eb83ff42 sys/shell/nimble: make default name more generic 2019-08-29 11:23:51 +02:00
Hauke Petersen
de890bd9a8 sys/shell/nimble: only print ip addr if ipv6 is used 2019-08-29 11:23:51 +02:00
Hauke Petersen
a3b8c87ab5 sys/shell: add 'ble' shell cmd for nimble_netif 2019-08-28 16:48:42 +02:00
Hauke Petersen
1cb54659c3 net/ble.h: add l2cap cid and gapp svc id constants 2019-08-28 16:48:42 +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
bcf2f2a2de sys/bluetil/addr: add doc in byte ordering 2019-08-28 16:48:41 +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
Rotzbua
9cf0c3bc70 sys/net: fix typos in docu 2019-08-28 15:59:16 +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
Aiman Ismail
ede7edd313 sys/net pkg/: document DTLS support in net_dtls 2019-08-27 16:41:39 +02:00
Aiman Ismail
fed72571ec sys/net/sock: add sock_dtls API 2019-08-27 16:41:39 +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
Rotzbua
5a8bac399c
drivers/ccs811: sys/hashes: fix typo usefull -> useful 2019-08-25 21:27:55 +02:00
Ken Bannister
4e89741b79 net/nanocoap: add function to iterate over options 2019-08-24 06:51:29 -04:00
Ken Bannister
6c8e646b83 net/nanocoap: check for payload marker when parse option 2019-08-24 06:51:29 -04:00
Kevin "Tristate Tom" Weiss
1b1c902dd3
Merge pull request #12022 from JannesVolkens/tmp00x
driver/tmp00x: make tmp006 more generic
2019-08-23 13:26:09 +02:00
Jannes
90c4ef04ef driver/tmp00x: Change tmp006 to tmp00x and add tmp007
Rename TMP006 to TMP00x
Add TMP007 sensor support to TMP00X
Change uint8_t reg to uint16_t
Add to doxygen documentation group
Expose compile time configurations
Move defines from .c to .h
Change double to float, because double is not needed
Add TMP007 register information
2019-08-23 12:11:16 +02:00
Ken Bannister
78ea07d5e7 net/nanocoap: make coap_pkt_t param const 2019-08-21 13:20:49 -04:00
Sebastian Meiling
8e08748c60
Merge pull request #7654 from cladmi/pr/arduino_sketches.cpp
arduino/sketches: build sketches as a module
2019-08-21 15:22:45 +02:00
Gaëtan Harter
be30f072e2
sys/arduino/sketches: build sketches as a module
Generate a module for arduino sketches in a subfolder of BINDIR.
This prevents issues when doing concurrent builds or out of tree build with
readonly sources.

Declare all generated files as `BUILDDEPS` to be re-created after
`clean` on parrallel `clean all`.
2019-08-21 11:57:41 +02:00
Vincent Dupont
af66fe101d can/isotp: allow changing FC options at runtime 2019-08-21 11:16:56 +02:00
Vincent Dupont
32b00706e3 can/isotp: remove timers when closing connection
Timers were not properly removed leading to hard faults if it fires
after the connection is closed.
2019-08-21 11:16:56 +02:00
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
d6356bdc08
Merge pull request #11692 from maribu/fmt_table
sys/fmt: Added submodule fmt_table for printing tables
2019-08-20 22:18:54 +02:00
Peter Kietzmann
11b4bab101
Merge pull request #10340 from maribu/cc110x_rewrite
drivers/cc110x: Complete rewrite from scratch
2019-08-20 17:58:21 +02:00
Marian Buschsieweke
88cf6cb46f
sys/auto_init/netif: Increased cc110x stack size
With the increase of the message queue size from 8 to 16 in
946b06e4f0, the default stack became too small.
This changes the stack size to grow with the message queue size.
2019-08-20 16:38:49 +02:00
Marian Buschsieweke
972367432a
drivers/cc110x: Rewrite of the cc110x driver
The cc110x driver has been re-written from scratch to overcome the limitations
of the old driver. The main motivation of the rewrite was to achieve better
maintainability by a detailed documentation, reduce the complexity and the
overhead of the SPI communication with the device, and to allow to
simultaneously use transceivers with different configuration regarding the used
base band, the channel bandwidth, the modulation rate, and the channel map.

Features of this driver include:

- Support for the CC1100, CC1101, and the CC1100e sub-gigahertz transceivers.
- Detailed documentation of every aspect of this driver.
- An easy to use configuration API that allows setting the transceiver
  configuration (modulation rate, channel bandwidth, base frequency) and the
  channel map.
- Fast channel hopping by pre-calibration of the channels during device
  configuration (so that no calibration is needed during hopping).
- Simplified SPI communication: Only during start-up the MCU has to wait
  for the transceiver to be ready (for the power regulators and the crystal
  to stabilize). The old driver did this for every SPI transfer, which
  resulted in complex communication code. This driver will wait on start up
  for the transceiver to power up and then use RIOT's SPI API like every other
  driver. (Not only the data sheet states that this is fine, it also proved to
  be reliable in practise.)
- Greatly reduced latency: The RTT on the old driver (@150 kbps data rate) was
  about 16ms, the new driver (@250 kbps data rate) has as RTT of ~3ms
  (depending on SPI clock and on CPU performance) (measured with ping6).
- Increased reliability: The preamble size and the sync word size have been
  doubled compared to the old driver (preamble: 8 bytes instead of 4,
  sync word: 4 byte instead of 2). The new values are the once recommended by
  the data sheet for reliable communication.
- Basic diagnostic during driver initialization to detect common issues as
  SPI communication issues and GDO pin configuration/wiring issues.
- TX power configuration with netdev_driver_t::set() API-integration
- Calls to netdev_driver_t::send() block until the transmission has completed
  to ease the use of the API (implemented without busy waiting, so that the
  MCU can enter lower power states or other threads can be executed).
2019-08-20 16:32:11 +02: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
Marian Buschsieweke
26d73116f6
sys/fmt: Added submodule fmt_table
print_col_u32_dec() / print_col_s32_dec() can be used to print an
uint32_t / int32_t as a column of the given width
2019-08-20 14:32:49 +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
Marian Buschsieweke
615e25f319
drivers: Removed driver for CC110x transceivers
- Removed cc110x driver
- Updated all makefiles
- Kept both board specific configurations and support for it in RIOT's
  upper layers, so re-implementations don't need to start from zero
2019-08-19 12:56:47 +02:00
Vincent Dupont
5a953a2137
Merge pull request #11991 from gschorcht/cpu/stp32_common/can/auto-init-cleanup
sys/auto_init/can: cleanup for STM32 CAN controller driver
2019-08-19 09:40:36 +02:00
913614ef04
Merge pull request #11004 from jcarrano/shell_cancel_line_ctrl-c
sys/shell: cancel current line on CTRL-C.
2019-08-16 13:00:33 +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
Juan Carrano
fa9337d73c sys/shell: cancel current line on CTRL-C.
CTRL-C cancels the current line, similar to how getty works.

This is useful if one is using a dumb terminal to communicate with
a node, as it saves having to repeatedly type backspace to discard the
current line. It also helps when connecting to an already running node,
as one does not know what is on the line buffer, the safest thing to do
is to begin by sending a ctrl-C.

This is a suggestion of @benemorius.
2019-08-15 17:13:42 +02:00
Gaëtan Harter
027426793c
test_utils_interactive_sync: add a helper for synchronizing tests
Add an implementation that waits for 's' to print 'START' and return.
If 'r' is given is prints 'READY' to allow querying for state.

The help and answered string have to be different to not match the other.
Using puts/getchar was smaller than using `stdio_read/stdio_write` on the
example I tested with `esp32`.
2019-08-15 12:26:28 +02:00
Marian Buschsieweke
c225636966
Merge pull request #10555 from gschorcht/irq_handler
sys: single interrupt handler thread for interrupts in modules with blocking functions
2019-08-13 15:08:53 +02:00
Gunar Schorcht
82e020fb81 sys/irq_handler: single interrupt handler thread
Single thread for handling interrupts that may trigger blocking  functions and therefore may only be called in thread context.
2019-08-13 14:49:10 +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
Sören Tempel
3396743bab gnrc_pktbuf: fix typo (guaranteeed → guaranteed) 2019-08-12 22:00:14 +02:00
Juan I Carrano
b48afd6375
Merge pull request #11807 from JulianHolzwarth/pr/xtimer_mutex_lock_timeout/first_fix_improvements
sys/xtimer/xtimer.c: _mutex_timeout() cleanup
2019-08-09 19:23:16 +02:00
Gunar Schorcht
ba00269dc9 sys/auto_init/can: cleanup for STM32 CAN controller
Initialization code for module `can_stm32` is obsolete since the STM32 CAN controller driver isn't a module anymore.
2019-08-09 18:23:05 +02:00
JulianHolzwarth
c1f58186cb xtimer/xtimer.c: sched_switch instead of yield
because of pr #11759: not all boards check for is_in_irq when thread_yield_higher
2019-08-09 17:29:40 +02:00
JulianHolzwarth
1bcb4fcc5f xtimer/xtimer.c: _mutex_timeout improvements
Only yields and change threads status when thread was removed from mutex list.
2019-08-09 17:29:40 +02:00
JulianHolzwarth
a321dfc51d xtimer/xtimer.c: ensure modifing mutex is done with interrupt disabled
if xtimer_set spins the callback is executed in the thread context.

comment to explain irq_disable
and when this line could be removed
(when xtimer stops executing the callback funtion from thread context)
2019-08-09 17:28:54 +02:00
Francisco
56a6e5d53e
Merge pull request #11933 from miri64/shell/fix/check-sender
shell_commands: check ICMPv6 echo reply sender
2019-08-09 16:27:39 +02:00
Martine Lenders
c12bd5edb1
Merge pull request #11938 from miri64/shell_commands/enh/now-id
shell_commands/ping6: mix-in current time into ID
2019-08-09 12:56:54 +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
Martine Lenders
af5bf360a0
Merge pull request #11575 from miri64/posix_socket/fix/init-uninit-fields
posix_socket: initialize uninitialized fields
2019-08-08 15:56:48 +02:00
Martine Lenders
3bcb1ee2ef posix_socket: initialize uninitialized fields 2019-08-08 15:03:28 +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
a06b84dbcd
Merge pull request #11965 from pokgak/credman-add-credential-type-docs
credman: add documentation for enum credman_type_t
2019-08-07 16:33:03 +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
Aiman Ismail
0c542f6605 credman: add documentation for enum credman_type_t 2019-08-07 14:00:39 +02:00
Juan I Carrano
ff57a904e3
Merge pull request #10271 from mtausig/aes_rv
Fix return value of aes_init for keys of incorrect length
2019-08-07 13:26:25 +02:00
Mathias Tausig
66edeeb9c6 crypto: aes_init(): Fail correctly when called with bad key length
A proper error code is returned if a key with unsupported (either by the implementation or the AES algorithm) length is passed to aes_init.
This fixes Issue #10175
2019-08-07 11:02:16 +02:00
Mathias Tausig
0352c7406d crypto: Fix code style 2019-08-07 11:02:16 +02:00
Benjamin Valentin
9311e05fcf sys/arduino: reduce scope of adc_line_state
This makes cppcheck happy.
2019-08-06 19:43:54 +02:00
Benjamin Valentin
0c98b79e2f sys/shell: reduce scope of variable 'entry' 2019-08-06 19:43:54 +02:00
Benjamin Valentin
9279733ed2 sys/shell: remove superfluous explicit cast 2019-08-06 19:43:54 +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
998fd6bcc9
sys/pthread: deduplicate pthread group definition 2019-08-05 16:57:36 +02:00
9e9ef3293d
sys/sha1: deduplicate sys_hashes_sha1 group definition 2019-08-05 16:57:36 +02:00
Martine S. Lenders
89afc378a9 emcute: fix length field calculation
The length field in an MQTT packet carries the _total_ length of the
packet. If it is below 256 (i.e. fits in one byte) only one byte is
used for the length field. If it is larger than that 3 bytes are used,
with the first byte having the value `0x01` and the remaining bytes
representing the length in as a 2 byte unsigned integer in network byte
order. Resulting from that it can be assessed that the check in
`emcutes`'s `set_len()` function is wrong as it needs to be checked if
`len` is lesser or equal to `0xff - 1`. `len <= (0xff - 1)` can be
simplified to `len < 0xff`. For some larger packages this safes 2 bytes
of wasted packet space.
2019-08-05 13:08:20 +02:00
Martine S. Lenders
10a3f3e8ed emcute: fix payload copy error for emcute_pub
`len` is used with the `memcpy()` to copy the payload to `tbuf`. With a
payload provided that is just long enough to fill `tbuf`, `len += 6`
leads to the `memcpy()` overriding data after `tbuf` (e.g. the
`mutex` that is unlocked right after) and thus resulting in potential
segmentation faults.
Additionally `+ 6` can only be applied if the total packet length is
below 256 (see spec), so `len + pos` is what needs to be provided to the
corresponding send functions instead (`pos` adapts to the header length
of the PUBLISH message).
2019-08-05 13:07:15 +02:00
Martine Lenders
4139370a87
Merge pull request #11952 from PeterKietzmann/pr_ccnl_update_and_bump
pkg/ccn-lite: bump version and adapt shell functions accordingly
2019-08-05 10:27:43 +02:00
Ken Bannister
513ddfd79c net/nanocoap: add Packet API block write functions 2019-08-02 09:46:24 -04: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
Cenk Gündoğan
89c3c4e20e shell/ccn-lite: type fixes 2019-08-02 10:37:47 +02:00
Hauke Petersen
2ff5720c95
Merge pull request #11576 from miri64/posix_socket/fix/fd-perms
posix_sockets: set read/write permissions for socket fd
2019-08-02 09:22:24 +02:00
Kevin "Bear Puncher" Weiss
2be1323357
Merge pull request #10929 from gschorcht/esp_now_wifi_cleanup
cpu/esp*: esp_now and esp_wifi cleanup
2019-08-01 09:56:06 +02: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
Gunar Schorcht
97bb33788b cpu/esp*: changes to use esp_wifi and esp_now 2019-07-31 13:53:48 +02:00
Martine Lenders
1c7d4572a7 shell_commands/ping6: mix-in current time into ID
This prevents two fast executions of `ping6` behind each other to
confuse their respective responses.
2019-07-31 09:49:17 +02: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
Martine S. Lenders
4a723fe4fd shell_commands: check ICMPv6 echo reply sender
Fixes #11519 by checking the source address when an echo reply is
received by the `ping6` command.
2019-07-30 12:47:23 +02:00
Martine Lenders
6e9612f1d1
Merge pull request #11928 from gschorcht/sys/event/detached_init
sys/event: fix of compilation problems
2019-07-29 17:02:14 +02:00
Gunar Schorcht
f604d3dec8 sys/event: fix of compilation problems
Unstructured static initializer like { 0 } lead to compilation errors on ESP8266, MSP430 and MIPS. Error messages are:

error: (near initialization for 'queue.event_list') [-Werror=missing-braces]
error: (near initialization for 'queue.waiter') [-Werror=missing-field-initializers]

This change fixes the compilation problem.
2019-07-29 13:10:08 +02: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
d1abb29665 sc_gnrc_icmpv6_echo: check for correct ipv6_addr_split_iface() error 2019-07-26 16:48:28 +02: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
36e9d232a6 shell_commands/gnrc_icmpv6_echo: use gnrc_netif_hdr_set_netif() 2019-07-25 15:32:21 +02:00
Martine S. Lenders
6ad3c8d223 shell_commands/gnrc_icmpv6_echo: use netif pointer
... instead of numeric network interface identifier
2019-07-25 15:32:02 +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
Martine S. Lenders
c3fe882cfe gnrc_netif_hdr: add setter for netif
This eases the refactoring to a pointer-based approach for network
interfaces.
2019-07-25 14:15:37 +02:00
Francisco
7eb579bf4f
Merge pull request #11886 from basilfx/feature/riotboot_assert
sys/riotboot: add missing assert.h
2019-07-23 17:12:10 +02:00
Leandro Lanzieri
b1babe5c19
Merge pull request #11880 from fjmolinas/pr_loramac_no_ack_retcode
pkg/semtech-loramac: update documentation
2019-07-23 09:06:19 +02:00
Bas Stottelaar
7213a95b31 sys/riotboot: add missing assert.h 2019-07-23 00:25:31 +02:00
Gaëtan Harter
225b50c423
sys/Makefile.include: check for newlib_nano instead of USE_NANO_SPECS
Check for the usage of `newlib_nano` module instead of the
`USE_NANO_SPECS` variable.

This allows also benefiting from the `printf_float` and `scanf_float`
behaviour on `arm7` and `riscv` cpus.
2019-07-22 16:52:18 +02:00
Francisco Molina
41e440a0ef pkg/semtech-loramac: extended return code doc and debug msg
- Add SEMTECH_LORAMAC_ALREADY_JOINED ret code for semtech_loramac_join
- Add SEMTECH_LORAMAC_TX_CNF_FAILED ret code for semtech_loramac_send
- Update shell commands to notify when no ACK is received on cnf tx
2019-07-22 16:12:23 +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
Martine Lenders
7d2cb71c51
Merge pull request #11564 from pokgak/credman
sys: add credman (D)TLS credential management module
2019-07-19 16:38:47 +02:00
Marian Buschsieweke
d15b8201b4
Merge pull request #10717 from keestux/refactor-evtimer-add-del
sys/evtimer: refactor evtimer add()/del()
2019-07-19 15:00:29 +02: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
Kees Bakker
d2cd666841 evtimer: in evtimer_print also print first event 2019-07-17 20:51:32 +02:00
Kees Bakker
629e96ea80 evtimer: refactor adding and deleting events 2019-07-17 20:51:32 +02: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
981a8ec1ce
Merge pull request #11805 from kaspar030/riotboot_add_sha256_verify
sys/riotboot: add initial image digest verification
2019-07-10 17:48:36 +02:00
0f5a2b4795 sys/riotboot: add initial image digest verification
Co-authored-by: Alexandre Abadie <alexandre.abadie@inria.fr>
2019-07-10 13:15:02 +02:00
JulianHolzwarth
ca8169f323 sys/include/xtimer.h: xtimer_mutex_lock_timeout() change comment
removing line because core_thread_flags is not required
2019-07-05 17:28:35 +02:00
6c02521591 nanocoap: make coap_get_block2() actually fill struct 2019-07-05 15:29:58 +02:00
Martine Lenders
f3493aa2b6
Merge pull request #11796 from kaspar030/pktbuf_remove_uio.h
gnrc/pktbuf: remove obsolete sys/uio.h include
2019-07-04 21:29:36 +02:00