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

6699 Commits

Author SHA1 Message Date
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
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
c7a534e42a
Merge pull request #12878 from haukepetersen/add_fmt_isnumber
sys/fmt: add fmt_is_number()
2019-12-05 20:32:47 +01:00
benpicco
b77ff84d9e
Merge pull request #12676 from ant9000/pr/usbus_cdc_ecm-mac_host-fix
USBUS CDC ECM: host and MCU mac addresses should differ
2019-12-05 18:53:10 +01:00
Hauke Petersen
cea260bb4f shell/sc_gnrc_netif: use fmt_is_number() 2019-12-05 15:39:25 +01:00
Hauke Petersen
ab3669294b sys/fmt: add fmt_is_number() 2019-12-05 15:39:24 +01:00
8ae7201962
Merge pull request #12550 from aabadie/pr/sys/progress_bar
sys/progress_bar: add module for managing a progress bar in stdout
2019-12-05 15:03:26 +01:00
Hauke Petersen
d9229af9d9 sys/fmt: move _is_digit and _is_upper to public API 2019-12-05 14:10:49 +01:00
Leandro Lanzieri
0673fce3c4 usbus/cdc/acm: Add configs to compile time configuration Doxygen group 2019-12-04 20:08:02 +01:00
Leandro Lanzieri
f48bd7f9f3 usbus: Add configs to compile time configuration Doxygen group 2019-12-04 20:08:02 +01:00
Leandro Lanzieri
731f27378b usb: Add configs to compile time configuration Doxygen group 2019-12-04 20:08:02 +01:00
Leandro Lanzieri
d835c52a4b usb: Fix VID/PID macros documentation 2019-12-04 20:08:02 +01:00
MichelRottleuthner
272079c89e
Merge pull request #11992 from JulianHolzwarth/pr/xtimer_mutex_lock_timeout/first_fix
sys/xtimer/xtimer.c: _mutex_timeout() bug fix for race condition
2019-12-04 10:43:20 +01:00
bd254dfc63
Merge pull request #10741 from basilfx/feature/stdio_null
sys: stdio_null: add null driver
2019-12-03 18:08:26 +01:00
cd25e1c011 usbus_fmt: assert descr len matches claimed len
This commit adds runtime assertions to validate that the total length of
the configuration descriptor as communicated to the host device matches the
generated length of the configuration descriptor.
2019-12-03 15:07:42 +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
7e165678fe
Merge pull request #12851 from leandrolanzieri/remove-ubjson
sys/ubjson: Remove module
2019-12-02 18:45:35 +01:00
9f1b84b51d
sys/progress_bar: add module for configurable progress bars 2019-12-02 16:48:16 +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
Juan Carrano
bea30c3f89 sys/ubjson: remove module.
The ubjson module has a number of quality defects and is unsafe.
Considering CBOR is popular, standarized and supported in RIOT and that
the ubjson implementation is a home-grown one whose API will likely be
unfamiliar to new users, I propose to delete it.

This removal, of course, dows not have to be NOW. We can deprecate it for
one or two releases before.

What's wrong with this module?

- Unsafe: the parsing is done recursively. This is embedded in the API, so it
  is not possible to fix it without changing the API. A document with too much
  nesting can cause a stack overflow.
- Does not validate writing: it is possible to produce invalid output. From
  the docs:
  > The library won't complain if you write multiple values that are not
  > inside an array or object. The result will just not be properly serialized.
- Poorly tested. As shown by #11702, #11703 the tests were not even detecting
  that a False was stored as True.
- In line with the previous remark, see
  68dc5b0d6e/tests/unittests/tests-ubjson/tests-ubjson.c (L66-L77)
  Why is the following code in the unit tests??
  ```c
    irq_disable();
    sched_set_status(data->main_thread, STATUS_PENDING);
  ```
- #2175 is still unfixed after 3.5 years.
- Code quality. The code has multiline macros that assign variables and
  return. See c332514875/sys/ubjson/ubjson-write.c (L34-L41)

Can we mark it as deprecated this release and sweep it in the following one?
2019-12-01 23:44:39 +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
Francisco
b88e2ecb6d
Merge pull request #12471 from aabadie/pr/sys/suit_shell
sys/suit: sys/shell: examples/suit_update: add shell command for triggering suit updates
2019-11-29 13:32:23 +01:00
Leandro Lanzieri
8aa66e94ea net/gnrc/netif: Remove 'if' prefix from interface names 2019-11-29 10:22:00 +01:00
Leandro Lanzieri
5481124d86 shell/gnrc_netif: Use netif API 2019-11-29 10:22:00 +01:00
Leandro Lanzieri
7746ee0aa1 net/netopt: Fix NETOPT_CHANNEL_PAGE documentation. 2019-11-29 09:34:38 +01:00
2ff3d4cd8d
sys/shell: add suit shell command
This command allows for triggering an update from the device itself
2019-11-28 19:15:34 +01:00
560ee3bac9
suit: add helper function for triggering updates 2019-11-28 19:08:28 +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
7d046b6b8d
Merge pull request #12831 from fjmolinas/pr_fix_interactive_sync_shell
autoinit: interactive sync if no shell% in USEMODULE
2019-11-28 08:47:20 +01:00
Leandro Lanzieri
2733ef45d7
Merge pull request #12798 from kb2ma/gcoap/init_delay
net/gcoap: add macro to delay initialization of gcoap
2019-11-28 05:10:43 +01:00
Ken Bannister
e873e5814a net/gcoap: add macro to delay initialization of gcoap 2019-11-27 17:56:55 -05:00
Francisco Molina
817df972b5 autoinit: interactive sync if no shell% 2019-11-27 23:19:48 +01:00
Francisco Molina
838a88f122 sys/shell/commands: add interactive_sync commands 2019-11-27 15:07:42 +01:00
JulianHolzwarth
7cd3e8b73e xtimer/xtimer.c:_mutex_timeout() improved
no longer into the "if" when the mutex is free
2019-11-27 14:49:16 +01:00
Pieter Willemsen
f3b13cf90c xtimer: check in timeout callback if thread blocked on mutex
Prevent a possible race condition when _mutex_timeout fires just after the
mutex was locked but before the xtimer was removed

The flow

int xtimer_mutex_lock_timeout(mutex_t *mutex, uint64_t timeout) {
   ...
    mutex_lock(mutex);
    /* mutex locked */
    /* _mutex_timeout fires and tries to remove thread from mutex queue */
    /* DEBUG: simulate callback call between lock and remove */
    xtimer_spin(xtimer_ticks_from_usec(timeout*2));
    xtimer_remove(&t);
    ...
}
2019-11-27 14:48:51 +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
b3593e58cb sc_netif: add lorawan config commands to shell 2019-11-26 21:52:06 +01:00
Jose Alamos
d3777d8ed8 auto_init/netif: add gnrc_lorawan startup routine 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
e03f7278bc gnrc_netif.h: add lorawan component 2019-11-26 21:52:05 +01:00
Jose Alamos
a70b1858c4 netopt: add NETOPTs required for gnrc_lorawan 2019-11-26 21:52:05 +01:00
Jose Alamos
e8bf26f7f3 gnrc_nettype: add GNRC_NETTYPE_LORAWAN type 2019-11-26 21:52:05 +01:00
Jose Alamos
845944e092 gnrc_netif_lorawan: add headers 2019-11-26 21:52:05 +01:00