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

5944 Commits

Author SHA1 Message Date
3b76a2c2be fmt: fix fmt_s32_dec() and fmt_s64_dec() sign bit handling
"val = -val" causes UB for INTMIN, thus explicitly cast to unsigned.
2019-01-16 15:23:19 +01:00
Sebastian Meiling
a0e143d09f
Merge pull request #10721 from nmeum/asymcute-out-of-bounds
asymcute: check for minimum packet length early
2019-01-16 13:53:49 +01:00
Sören Tempel
2a6354b07d asymcute: check for minimum packet length early
Without this patch _len_get reads one byte beyond the con->rxbuf
if the incoming packet consists only of the byte 0x01.
2019-01-16 10:06:38 +01:00
Cenk Gündoğan
abb72db73a
Merge pull request #10776 from miri64/gnrc_sixlowpan_frag/enh/detect-duplicates
gnrc_sixlowpan_frag: drop received duplicates
2019-01-16 00:08:25 +01:00
Martine Lenders
01370511df gnrc_sixlowpan_frag: drop received duplicates
Otherwise duplicate fragments are added to the number of already
received datagram bytes in L153 leading to possible race-conditions.
2019-01-15 20:09:49 +01:00
Emmanuel Baccelli
209d90bc00
Merge pull request #10215 from kYc0o/pr/riotboot_multislot
riotboot: add multislot support
2019-01-15 19:04:28 +01:00
Martine Lenders
8bd9e0f0c2 shell: sc_icmpv6_echo: release payload when pktbuf full
Otherwise it gets never released

Co-Authored-By: Gunar Schorcht <gunar@schorcht.net>
2019-01-15 15:07:46 +01:00
Martine Lenders
465631f83c gnrc_netif: doc-group device-type based functions 2019-01-15 11:51:21 +01:00
Cenk Gündoğan
6a4c764c95
Merge pull request #10569 from miri64/gnrc_netif/enh/rm-get-NETOPT_IPV6_IID
gnrc_netif: make _get_iid() just wrapper around _iid_from_addr()
2019-01-14 14:09:34 +01:00
Martine Lenders
7ae90564d9 gnrc_netif: make _get_iid() just wrapper around _iid_from_addr()
This way the IID generation gets much simplified and code duplication
is avoided since it removes GNRC's requirement for NETOPT_IPV6_IID.
2019-01-14 13:42:58 +01:00
4b1b0aa84e sys/net/nanocoap: fix possible option_count overflow 2019-01-14 12:30:06 +01:00
11e4309f35
Merge pull request #10740 from miri64/sock_dns/bug/i10739
sock_dns: fix out-of-bound errors
2019-01-10 18:26:11 +01:00
Martine Lenders
894ad29322 sock_dns: remove out-of-place puts() call 2019-01-10 18:07:29 +01:00
Martine Lenders
8ad5e44cba sock_dns: remove some magic numbers 2019-01-10 18:07:29 +01:00
Martine Lenders
2840b3825e sock_dns: fix out-of-bound errors
Fixes #10739
2019-01-10 18:07:29 +01:00
Ken Bannister
86ff4d3dc5 net/nanocoap: fix request retry countdown 2019-01-10 06:21:47 -05:00
Martine Lenders
f2754a4dfc
Merge pull request #10742 from gschorcht/gnrc_netif_enh
gnrc_netif_*: use the `gnrc_netif_t::pid` member instead of the pid of the current thread in netif header
2019-01-10 10:30:07 +01:00
Sebastian Meiling
6767caea5f
Merge pull request #10709 from keestux/eliminate-cast-ds18
drivers/ds18: refactor functions with const dev pointer
2019-01-10 09:17:53 +01:00
Gunar Schorcht
dbb5e886e5 gnrc_netif_ieee802154: use pid member in netif header
Use the `gnrc_netif_t::pid` member instead of the pid of the current thread when generating the the `gnrc_netif_hdr` in `gnrc_netif_ieee802154::_recv` function.
2019-01-10 00:09:52 +01:00
Gunar Schorcht
3876dd4bb9 gnrc_netif_ethernet: use pid member in netif header
Use the `gnrc_netif_t::pid` member instead of the pid of the current thread when generating the the `gnrc_netif_hdr` in `gnrc_netif_ethernet::_recv` function.
2019-01-10 00:09:24 +01:00
Sebastian Meiling
db3309eec8
Merge pull request #10726 from nmeum/nanocoap-sock-retval
nanocoap: fix sock_udp return value checks
2019-01-09 09:22:40 +01:00
Kees Bakker
b8472550a4 drivers/ds18: eliminate cast in auto_init_ds18 2019-01-08 19:25:22 +01:00
Sören Tempel
d70a94f139 nanocoap: fix sock_udp return value checks 2019-01-08 19:01:39 +01:00
Gunar Schorcht
fb9e25faf7
Merge pull request #10724 from miri64/gnrc_ipv6_nib/fix/mixed-mode-ABRO
gnrc_ipv6_nib: fix RA reception for non-6LN interfaces
2019-01-08 09:47:09 +01:00
Martine Lenders
7452f48c26 gnrc_sixlowpan_frag: unroll recursion
While the recursion in `gnrc_sixlowpan_frag` shouldn't be infinite we
still should avoid using recursions in general (also to be able to
statically analyze stack usage). This unrolls the recursion.
2019-01-08 09:03:22 +01:00
201cff0ada
Merge pull request #10722 from nmeum/gnrc-tcp-comment-typo
gnrc_tcp_pkt: fix typo in comment
2019-01-07 20:23:20 +01:00
Martine Lenders
1f71b30bc2 gnrc_ipv6_nib: fix RA reception for non-6LN interfaces
When having a non-6LN interface and a 6LN interface (e.g. on a border
router) the assertion can hit when a Router Advertisement is received.
This makes the check an `if` statement rather than an assertion, to
account for that case.

Co-authored-by: Gunar Schorcht <gunar@schorcht.net>
2019-01-07 17:36:03 +01:00
Sören Tempel
45989aa60e gnrc_tcp_pkt: fix typo in comment 2019-01-07 16:15:41 +01:00
Martine Lenders
242bb55c24
Merge pull request #10719 from miri64/gnrc_netif/enh/add-l2addr-to-doc
gnrc_netif: add l2addr members to doc
2019-01-07 15:43:10 +01:00
Sebastian Meiling
53a887ce14
Merge pull request #10703 from kb2ma/coap/code_macros
net/coap: improve message code macros
2019-01-07 14:31:18 +01:00
Martine Lenders
48ac0ea902 gnrc_netif: add l2addr members to doc
The `l2addr` and `l2addr_len` members of the `gnrc_netif_t` struct did
not show up in the rendered documentation.
2019-01-07 13:05:02 +01:00
Cenk Gündoğan
aa2de01b56
Merge pull request #10665 from miri64/gnrc_sixloenc/feat/initial
gnrc_sixloenc: introduce pseudo-module to send 6Lo frames over Ethernet
2019-01-07 11:58:33 +01:00
Martine Lenders
10f534854c gnrc_sixlowpan: make title of NETAPI section more specific 2019-01-07 10:30:47 +01:00
Martine Lenders
0c51a67631 gnrc_ipv6: make title of NETAPI section more specific 2019-01-07 10:30:33 +01:00
Sebastian Meiling
26ea289ce0
Merge pull request #10583 from miri64/gnrc_ipv6/enh/doc
gnrc_ipv6: make gnrc_netapi documentation more detailed
2019-01-07 09:14:39 +01:00
Ken Bannister
62f4946772 net/coap: improve message code macros 2019-01-04 19:43:18 -05:00
Martine Lenders
481f742c71 gnrc_netif: interface configuration for 6LoENC 2019-01-04 13:32:24 +01:00
Martine Lenders
45b95e86cd gnrc_nettype: provide ethertype to nettype for 6LoEnc 2019-01-04 13:31:03 +01:00
Martine Lenders
dda7131374 ethertype: define 6LoWPAN encapsulation ethertype 2019-01-04 13:29:47 +01:00
b77c802f9b
Merge pull request #10666 from miri64/netopt/new/6lo
netopt: provide option to (de-)activate 6Lo
2019-01-03 18:50:31 +01:00
Martine Lenders
f475f1cc18
Merge pull request #10678 from kb2ma/nanocoap/doc_config_group
net/nanocoap: allow user to configure macros
2019-01-03 17:06:39 +01:00
Martine Lenders
365cac1749
Merge pull request #10677 from kb2ma/coap/doc_config_group
net/coap: allow user to configure message retry macros
2019-01-03 17:04:19 +01:00
Martine Lenders
e88abc49b8 shell_commands/sc_gnrc_netif: get 6Lo flag 2019-01-03 16:21:52 +01:00
Martine Lenders
45b9dd6f50 gnrc_netif: implement get NETOPT_6LO 2019-01-03 16:21:52 +01:00
Martine Lenders
59366022ca netopt: provide option to (de-)activate 6Lo 2019-01-03 16:21:52 +01:00
Martine Lenders
019c1aba16
Merge pull request #10676 from kb2ma/gcoap/doc_config_group
net/gcoap: add config macros to config doc group
2019-01-03 15:59:27 +01:00
0d4b55e0c8
Merge pull request #10654 from keestux/driver-rn2xx3-rx1delay
loramac: change rxdelay1 to millisec, was seconds
2019-01-03 11:24:17 +01:00
0ca4703dde
Merge pull request #10687 from kb2ma/nanocoap/remove_macro
net/nanocoap: remove obsolete macro
2019-01-03 11:00:52 +01:00
José Alamos
f14d46d935
Merge pull request #10242 from miri64/gnrc_ipv6_ext_rh/enh/icmpv6_error_msg
gnrc_ipv6_ext_rh: add ICMPv6 error message sending
2019-01-03 10:35:54 +01:00
Ken Bannister
5e9a2c0925 net/nanocoap: allow user to configure macros 2019-01-02 13:12:05 -05:00
Ken Bannister
5f8e993faf net/coap: reference RFC for configurability 2019-01-02 12:54:12 -05:00
Ken Bannister
663bb5bb3d net/coap: use separate name for macro doc 2019-01-02 12:54:12 -05:00
Ken Bannister
94660f4db7 net/coap: allow user to configure message retry macros 2019-01-02 12:54:12 -05:00
Francisco Acosta
8f22175af3 riotboot_slot: add second slot compatibility
When a second slot is defined, the "partition table"
gets a second field which represents the starting of
the second slot, at a defined offset.
2019-01-02 17:56:11 +01:00
Ken Bannister
c17cf650ca net/nanocoap: remove obsolete macro 2018-12-31 07:17:29 -05:00
Ken Bannister
03d4230d3a net/gcoap: specify range for token length 2018-12-31 06:13:55 -05:00
Martine Lenders
c6150d3b35 gnrc_ipv6: make gnrc_netapi documentation more detailed 2018-12-30 19:24:24 +01:00
Ken Bannister
beae37cf18 net/gcoap: retitle documentation group
Avoids confusion with generic CoAP and capitalization retains order
in documentation.
2018-12-30 10:45:35 -05:00
Ken Bannister
3467994896 net/gcoap: add config macros to config doc group 2018-12-30 10:45:35 -05:00
Gunar Schorcht
d3f78a5a40
Merge pull request #10679 from miri64/gnrc_sixlowpan_frag/fix/send-check-msg-queue
gnrc_sixlowpan_frag: check if own message queue is full
2018-12-30 15:48:26 +01:00
Martine Lenders
e8da744e6d gnrc_sixlowpan_frag: release packet when frag hdr can't be marked
Otherwise, there will be leaks ;-).
2018-12-30 01:05:34 +01:00
Martine Lenders
a409603f84 gnrc_sixlowpan_frag: release packet when rbuf is full
Otherwise, there will be leaks ;-).
2018-12-30 00:59:04 +01:00
Martine Lenders
9e3cdebae1 gnrc_sixlowpan_frag: check if own message queue is full
When issueing the sending of the next fragment the current version of
`gnrc_sixlowpan_frag` doesn't check if the queue is full. This leads to
leakage of the packet buffer, since when it is full, the package never
gets released.

This change adds a checks and error exits in case the queue is full.
2018-12-29 22:54:52 +01:00
Martine Lenders
d5bbf45d32 gnrc_sixlowpan_frag: reduce code duplication in send 2018-12-29 22:54:14 +01:00
Timo Rothenpieler
814e4ecbbe gnrc_netif: ESP-NOW talks 6Lo now 2018-12-29 13:15:44 +01:00
Lotte Steenbrink
b6b4fed26d
Merge pull request #10659 from miri64/gnrc_sixlowpan/enh/netapi-doc
gnrc_sixlowpan: amend gnrc_netapi introduction
2018-12-27 23:21:20 +01:00
Martine Lenders
def3aa9b65
Merge pull request #10629 from miri64/gnrc_netif/cleanup/mac-flags
gnrc_netif: remove superfluous GNRC_NETIF_FLAGS_MAC_*
2018-12-27 19:56:00 +01:00
Martine Lenders
dd55c792c5
Merge pull request #10574 from haukepetersen/add_bluetil_ad
net/ble: add generic advertisement data (AD) processing helper
2018-12-27 19:30:43 +01:00
Martine Lenders
b5ba43b517 gnrc_sixlowpan: amend gnrc_netapi introduction 2018-12-27 14:06:35 +01:00
Gunar Schorcht
e07ea98bc3
Merge pull request #10536 from miri64/gnrc_ipv6_nib/bug/correct-reverse
gnrc_ipv6_nib: use correct reverse-translate for ARSM-less NCE
2018-12-27 10:44:23 +01:00
Martine Lenders
f160849e8a gnrc_ipv6_nib: use correct reverse-translate for ARSM-less NCE
The current implementation uses the assumption that the IPv6 address is
always based on an EUI-64, which it doesn't has to.
2018-12-27 10:21:31 +01:00
Kees Bakker
fd446f516d loramac: change rxdelay1 to millisec, was seconds
The RN2xx3 device has this parameter in milliseconds. So far, there is no
other device driver using loramac.h

Notice that RN2xx3 only has a get command for rxdelay2, not a set command.
Nevertheless, that parameter was changed to milliseconds as well.
2018-12-24 19:31:55 +01:00
Lotte Steenbrink
c46f95817d sys/include/net/icmpv6.h: fix two small typos 2018-12-24 14:34:50 +01:00
Sebastian Meiling
139b5dba3c
Merge pull request #10501 from kb2ma/gcoap/req_path_null
net/gcoap: allow NULL path in gcoap_req_init()
2018-12-21 14:36:04 +01:00
Gunar Schorcht
f171f38c3e sys/autoinit: fix alphabetical order 2018-12-20 12:42:44 +01:00
Schorcht
74e1ab220c drivers: add driver for CCS811 gas sensor 2018-12-20 12:42:44 +01:00
Sebastian Meiling
fa38f05574
Merge pull request #10642 from kb2ma/nanocoap/fix_nanocoap_sock_includes
net/nanocoap: fix includes for nanocoap sock
2018-12-20 08:38:03 +01:00
Ken Bannister
bd457aee2b net/nanocoap: fix includes for nanocoap sock 2018-12-20 00:37:18 -05:00
4878cf2119
Merge pull request #10400 from miri64/core/enh/thread_has_queue_func
core: provide function to check msg queue initialization
2018-12-19 18:41:39 +01:00
Martine Lenders
a14e33df01 gnrc_netreg: use thread_has_msg_queue() for msg queue check 2018-12-19 15:39:50 +01:00
Martine Lenders
986b9d380b gnrc_netreg: make message queue check more readable 2018-12-19 15:39:50 +01:00
Juan Carrano
b34dc3a565 sys/shell: ensure character is flushed when echoing.
When using a serial terminal without local echo, the current line
would not get updated as the user typed because the shell module's
readline() was not flushing each character.

This commit fixes that behavior. For additional clarity, fflush is
turned into a macro (flush_if_needed) which expands to either a call
to fflush() or empty, according to the standard library used.

This also fixes the erase/line editing behavior (the delete characters
were not being flushed either.)
2018-12-19 12:08:54 +01:00
Martine Lenders
3ce4b7454f
Merge pull request #10379 from cgundogan/pr/sixlowpan_nonipv6
sixlowpan: minor fixes for non-ipv6 usage
2018-12-18 22:36:03 +01:00
Cenk Gündoğan
79de5ae6e6 sixlowpan: minor fixes for non-ipv6 usage 2018-12-18 21:32:54 +01:00
Martine Lenders
5e03f58746
Merge pull request #10383 from miri64/gnrc_pktdump/enh/add-ipv6-ext
gnrc_pktdump: add GNRC_NETTYPE_IPV6_EXT output
2018-12-18 20:52:45 +01:00
Emmanuel Baccelli
3a3c23df36
Merge pull request #10065 from kYc0o/pr/riotboot
bootloader: add riotboot minimal bootloader
2018-12-18 20:27:11 +01:00
Martine Lenders
0a5ef011e1 gnrc_ipv6_ext_rh: add ICMPv6 error message sending 2018-12-18 19:46:27 +01:00
Martine Lenders
13e66ce3f2
Merge pull request #10238 from miri64/gnrc_ipv6_ext/cleanup/merge-handle-rh
gnrc_ipv6_ext: merge _handle_rh and gnrc_ipv6_ext_rh_process
2018-12-18 19:39:16 +01:00
Francisco Acosta
2df0abfd70 sys/riotboot: add riotboot_slot module
This module adds some helper function to manage slots
created with a riotboot_hdr header.

Co-authored-by: Kaspar Schleiser <kaspar@schleiser.de>
2018-12-18 19:31:34 +01:00
Martine Lenders
8701c0f80a gnrc_ipv6_ext: merge _handle_rh and gnrc_ipv6_ext_rh_process
It's a lot cleaner and makes more sense if we merge those two.
2018-12-18 19:03:40 +01:00
Marian Buschsieweke
92347a0dd8
sys/shell: Removed unneeded cpp directives 2018-12-18 16:37:52 +01:00
Martine Lenders
affb385be6
Merge pull request #10623 from jia200x/pr/lora_conf
lora: add lora and loramac config macros to config doc group
2018-12-18 14:51:49 +01:00
Martine Lenders
06c13bdd70 gnrc_netif: remove superfluous GNRC_NETIF_FLAGS_MAC_*
They are also defined in `net/gnrc/netif/mac.h` and those are the ones
used by the current `gnrc_mac` implementations.
2018-12-18 14:47:24 +01:00
Martine Lenders
bddbe93976 gnrc_netif: remove premature doc group close
This adds `GNRC_NETIF_FLAGS_RAWMODE` to the `net_gnrc_netif_flags_t`
group.
2018-12-18 14:45:51 +01:00
Martine Lenders
d4fd6076c4
Merge pull request #10626 from jia200x/pr/ieee802154_conf
ieee802154: add config macros to config doc group
2018-12-18 14:22:51 +01:00
Jose Alamos
3e3321445f lora.h: move brief tag outside of ifndef block 2018-12-18 13:23:36 +01:00
Jose Alamos
022e1f57b8 loramac: add config macros to config doc group 2018-12-18 13:23:36 +01:00
Jose Alamos
39821c93b0 lora.h: fix doxygen brief tag 2018-12-18 13:23:36 +01:00
Jose Alamos
0759ad85a6 lora: add config macros to config doc group 2018-12-18 13:23:36 +01:00
Jose Alamos
a95bea6cf1 ieee802154: add brief tag to configuration macros 2018-12-18 13:22:21 +01:00
Jose Alamos
f50a239f8e ieee802154: add config macros to config doc group 2018-12-18 13:22:21 +01:00
José Alamos
0dd711cb9f
Merge pull request #10616 from miri64/gnrc_netif/enh/config-group
gnrc_netif: add config macros to config doc group
2018-12-18 11:05:29 +01:00
José Alamos
1c82f7804b
Merge pull request #10617 from miri64/gnrc_ipv6/enh/config-group
gnrc_ipv6: add config macros to config doc group
2018-12-17 13:55:28 +01:00
Sebastian Meiling
496daa0b9f
Merge pull request #10582 from miri64/gnrc_sixlowpan/enh/doc-update
gnrc_sixlowpan: update documentation
2018-12-17 13:32:11 +01:00
Martine Lenders
2e57ea246e
Merge pull request #10584 from miri64/gnrc_ipv6/enh/use-new-pktbuf-func
gnrc_ipv6: use gnrc_pktbuf_merge() to loopback packet
2018-12-17 12:16:06 +01:00
Martine Lenders
864ce4fed2 gnrc_ipv6_ext: rename nh to protnum for clarity 2018-12-15 18:21:48 +01:00
Martine Lenders
bbcb3161ea gnrc_ipv6_ext: make single header demux function private
The function is now only called by `gnrc_ipv6_ext_process_hopopt()` and
`gnrc_ipv6_ext_process_all()`, both are part of the `gnrc_ipv6_ext`
module.
2018-12-14 19:07:16 +01:00
Martine Lenders
0580fa5852 gnrc_ipv6: dispatch ext. headers to external interested parties
This way e.g. a raw socket listening for an extension headers protocol
number also get's it.
2018-12-14 19:07:16 +01:00
Martine Lenders
e4fa14370f gnrc_ipv6: handle hop-by-hop option before forwarding 2018-12-14 19:07:15 +01:00
Martine Lenders
5c0d18b25f gnrc_ipv6: move ext. hdr handling out of general demux
They are handled separately anyway and this allows us to handle
the Hop-by-hop option *before* forwarding in a later step.
2018-12-14 19:06:00 +01:00
Martine Lenders
17eee216b6 gnrc_ipv6_ext: add missing newline to DEBUG 2018-12-14 19:05:52 +01:00
Martine Lenders
3f17db141d gnrc_ipv6: add config macros to config doc group 2018-12-14 16:34:34 +01:00
Martine Lenders
d37bb41b03 gnrc_netif: add config macros to config doc group 2018-12-14 16:26:56 +01:00
Martine Lenders
a90943457f gnrc_sixlowpan: specify sections in RFC links 2018-12-14 13:57:44 +01:00
Martine Lenders
492df78f63 gnrc_ipv6: use gnrc_pktbuf_merge() to loopback packet
With `gnrc_pktbuf_merge()` introduced in
f03247e752 we can remove some code
duplication when it comes to looping back a packet.
2018-12-14 11:10:51 +01:00
José Alamos
b709e63581
Merge pull request #10234 from miri64/gnrc_ipv6/enh/iterate-out-of-ext
gnrc_ipv6: move ipv6_ext iteration out of ext_demux()
2018-12-14 10:44:00 +01:00
Martine Lenders
e06cdcdf14 gnrc_pktdump: add GNRC_NETTYPE_IPV6_EXT output 2018-12-14 01:37:53 +01:00
Martine Lenders
4257b70c6f gnrc_pktbuf: update tense of deprecation note ;-)
With the preceding changes the subject of the deprecation note on
`gnrc_pktbuf_duplicate_upto()` becomes actual and thus doesn't need to
be referred to in future but past tense.
2018-12-13 17:22:12 +01:00
Martine Lenders
b8f71c37ff gnrc_ipv6: rename should_release for clarity 2018-12-13 17:22:12 +01:00
Martine Lenders
e6df40dbde gnrc_ipv6: clean-up unrequired stuff after demux rework 2018-12-13 17:22:12 +01:00
Martine Lenders
764ed8c300 gnrc_ipv6: make next-header demuxer private
Since the recursion into `gnrc_ipv6_demux()` was removed in
`gnrc_ipv6_ext`, `gnrc_ipv6.c` is the only user of this function,
so it can be made private. It was only made public so it can be used
from `gnrc_ipv6_ext`.
2018-12-13 17:22:12 +01:00
Martine Lenders
f671a87fe2 gnrc_ipv6_ext: remove unnecessary pkt write-protection
As `pkt` isn't pre-parsed the write-protection of *the whole* packet
(except the netif-header) comes for free, when this was done in the
receive routine of IPv6.
2018-12-13 17:22:12 +01:00
Martine Lenders
02a7bc252a gnrc_ipv6: move ipv6_ext iteration out of ext_demux()
Since with #10233 we now assume IPv6 packets always to not be
pre-parsed, we can iterate over the extension headers by gradually
"eating" them away. This allows us to move the iteration over them
out of `gnrc_ipv6_ext_demux()` and into `gnrc_ipv6_demux()`.

By moving the iteration over all extension headers out of
`gnrc_ipv6_ext_demux()` we also can

1. simplify the extension header handling a lot, as it now
   just a loop inside `gnrc_ipv6_demux()`,
2. remove the recursion to `gnrc_ipv6_demux()` within
   `gnrc_ipv6_ext_demux()`.
2018-12-13 17:22:11 +01:00
Martine Lenders
b0706ca82b netopt: deprecate getting NETOPT_IPV6_IID from netdev 2018-12-12 10:21:39 +01:00
Martine Lenders
30b39dcf44
Merge pull request #10580 from gschorcht/drivers_sht3x_auto_init_fix
sys/auto_init: alphabetical order for SHT3x fixed
2018-12-12 09:56:18 +01:00
Sebastian Meiling
4f646b4efc
Merge pull request #10441 from miri64/gnrc_netapi/enh/codesize-opt
gnrc_netapi: optimize code-size
2018-12-12 09:51:02 +01:00
Martine Lenders
c16d0bc96e gnrc_netapi: use static inline for high-level wrapper functions
This reduces the overall code size of GNRC applications by a few bytes.
2018-12-11 16:15:51 +01:00
Hauke Petersen
b9aeaa7418 sys/event: decouple event_queue from thread 2018-12-11 13:41:21 +01:00
Martine Lenders
26d55bb040 gnrc_sixlowpan: replace HTML links with markdown links 2018-12-10 15:30:59 +01:00
Martine Lenders
70b7c8b09f gnrc_sixlowpan: update flag doc from old gnrc_netif 2018-12-10 15:25:51 +01:00
Martine Lenders
ecd7250c9e gnrc_sixlowpan: update gnrc_netapi doc 2018-12-10 15:17:00 +01:00
José Alamos
970bec1d1b
Merge pull request #10233 from miri64/gnrc_ipv6/enh/assume-no-preparsed-pkt
gnrc_ipv6: assume no preparsed packets
2018-12-10 14:21:17 +01:00
Gunar Schorcht
56c09a088c sys/auto_init: alphabetical order for SHT3x fixed
This commit fixes the alphabetical order in sys/auto_init for the SHT3x driver.
2018-12-10 12:45:27 +01:00
Hauke Petersen
23abc89675 net/ble: add generic BLE helper module (bluetil)
So far, the helper module only contains functions for AD
(advertising data) processing
2018-12-07 18:13:53 +01:00
Hauke Petersen
3f93485eab net/ble: add GAP AD constants to generic ble.h 2018-12-07 18:10:53 +01:00
Hauke Petersen
a24f669c4c
Merge pull request #10521 from miri64/gnrc_sixlowpan_iphc/fix/non-ieee802154-support
gnrc_sixlowpan_iphc: allow address compression for non-IEEE802.15.4
2018-12-07 14:58:13 +01:00
Hauke Petersen
bdc1b89c93
Merge pull request #10520 from miri64/gnrc_netif_hdr/enh/conv-iid-getter
gnrc_netif_hdr: provide wrappers for gnrc_netif_ipv6_iid_from_addr()
2018-12-07 14:37:07 +01:00
Martine Lenders
a7e3791f3b gnrc_sixlowpan_iphc: allow address compression for non-IEEE802.15.4 2018-12-07 13:03:40 +01:00
Martine Lenders
4d4e96f9f9 gnrc_netif_hdr: provide wrappers for gnrc_netif_ipv6_iid_from_addr()
For convenience ;-).
2018-12-07 12:59:37 +01:00
Hauke Petersen
bd4893277e net/ethernet: remove get_iid() function
the fuctionality was moved into eui48_to_ipv6_iid()
2018-12-06 22:02:01 +01:00
Hauke Petersen
ec37ff5825 gnrc/netif: use eui48_x() for IID handling 2018-12-06 22:02:01 +01:00
Hauke Petersen
f5355ba36e net: add generic EUI-48 header 2018-12-06 22:02:01 +01:00
Martine Lenders
eead6066dd
Merge pull request #10565 from haukepetersen/fix_gnrc_netifinternalvoiddefs
gnrc/netif/internal: fix copy-paste error
2018-12-06 19:30:21 +01:00
Martine Lenders
be7e42a888
Merge pull request #10562 from miri64/gnrc_ipv6/fix/hl0
gnrc_ipv6: fix hop-limit == 0 case
2018-12-06 18:54:53 +01:00
Hauke Petersen
fe7fba7674 gnrc/netif/internal: fix copy-paste error
the names for iid_from_addr and iid_to_addr functions in the
else-block were switched around, so this fixes that
2018-12-06 17:16:23 +01:00
Martine Lenders
3fde0ef8f8 gnrc_ipv6: remove special handling for encapsulated IPv6 headers
Since the packet is now guaranteed to be preparsed, the currently
handled IPv6 header will always be in the first snip. Because of this
the packet parser can't get confused anymore which IPv6 header is the
one to be handled so we don't need to remove the more outer ones.
Because of this we can just use the normal packet dispatching (which is
already used by other `GNRC_NETTYPE_*`-known protocol numbers such as
UDP).

This also reverts d54ac38f84.
2018-12-06 16:22:32 +01:00
Martine Lenders
4befe0b5e2 gnrc_ipv6: assume no preparsed packets 2018-12-06 16:22:31 +01:00
Martine Lenders
9bb458dac1
Merge pull request #10229 from miri64/gnrc_ipv6_ext/enh/shortcut-forward
gnrc_ipv6_ext: use send for forwarding with RH
2018-12-06 16:17:50 +01:00
Hauke Petersen
92fcb4de6a
Merge pull request #10513 from miri64/gnrc_netif/enh/iid-conversion
gnrc_netif: add general IID to/from l2addr conversion functions
2018-12-06 15:57:06 +01:00
Hauke Petersen
1b1802aaf6
Merge pull request #10469 from miri64/gnrc_ndp/enh/rtr-wo-arsm
gnrc_ndp: make compilable for router without ARSM
2018-12-06 15:38:38 +01:00
Martine Lenders
bc7d083094 gnrc_ipv6: fix hop-limit == 0 case 2018-12-06 15:34:06 +01:00
Martine Lenders
b530c1bb94 gnrc_ipv6_ext: use send for forwarding with RH
Though this change might seem more complicated, it has the benefit, that
after #9484 we don't have to assume that a received packet within IPv6's
receive function can be handed to the function pre-parsed, making that
function far less complicated (will be provided in a future PR).

Also this might give the forwarding via routing header a little
performance boost, as we now don't *receive* the packet first only to
forward it later-on.
2018-12-06 14:47:46 +01:00
Martine Lenders
bc1b490086 gnrc_ipv6_nib: gnrc_netif_iid_to_addr() instead of _reverse_iid() 2018-12-06 14:41:30 +01:00
Martine Lenders
a44f7f7b38 gnrc_netif: use general IID conversion function for netif-based 2018-12-06 14:41:30 +01:00
Martine Lenders
5ca30b9b03 gnrc_netif: add general IID to/from l2addr conversion functions
They are required to make GNRC's 6Lo IPHC implementation ready for
hardware addresses other than IEEE 802.15.4's.
2018-12-06 14:41:30 +01:00
f38d9d14c6
Merge pull request #10549 from miri64/gnrc_netif/enh/submodules
gnrc_netif: make link-layer specific operations proper submodules
2018-12-05 17:44:40 +01:00
Martine Lenders
08524ca1d2 gnrc_netif_hdr: move path resolve to gnrc_netif submodule resolution
No that we introduced sub-modules to `gnrc_netif` we can move that here
as well.
2018-12-05 15:04:45 +01:00
Martine Lenders
72c5fd06b4 gnrc_netif: make link-layer specific operations proper submodules 2018-12-05 15:04:04 +01:00
Hauke Petersen
6551d8aac0
Merge pull request #10500 from miri64/gnrc_netif_hdr/enh/conv-netif-getter
gnrc_netif_hdr: provide convenience function to get netif pointer from netif header.
2018-12-05 14:26:02 +01:00
Martine Lenders
d94ba6c7d1 gnrc_sixlowpan_iphc: use gnrc_netif_hdr_get_netif() function 2018-12-05 14:08:32 +01:00
Martine Lenders
868a856cbc gnrc_sixlowpan: use gnrc_netif_hdr_get_netif() function 2018-12-05 14:08:32 +01:00
Martine Lenders
b447501382 gnrc_ipv6: use gnrc_netif_hdr_get_netif() function 2018-12-05 14:08:32 +01:00
Martine Lenders
b90fff9f06 gnrc_icmpv6_error: use gnrc_netif_hdr_get_netif() function 2018-12-05 14:08:32 +01:00
Martine Lenders
f95cabe8df gnrc_netif_hdr: add convenience function to get netif pointer 2018-12-05 14:08:32 +01:00
Martine Lenders
e4a922260e shell_commands/ifconfig: mark TENTATIVE addresses correctly 2018-12-04 15:53:46 +01:00
90db0bf253
Merge pull request #10253 from kYc0o/pr/riot_hdr
sys: add riotboot_hdr module
2018-12-04 09:44:45 +01:00
Francisco Acosta
00adbd69f6 sys: add riotboot_hdr submodule
riotboot_hdr enables to partition the internal flash memory
into "slots", each one with a header providing information
about the partition. The concept for now is limited to
firmware partitions, which are recognised by the riotboot
bootloader. In the future the concept might be extended to
represent other content.

Co-authored-by: Kaspar Schleiser <kaspar@schleiser.de>
2018-12-03 23:58:45 +01:00
Martine Lenders
0c09a9ad8b
Merge pull request #10538 from smlng/pr/embunit
tests: adapt embunit TEST_ASSERT_EQUAL_STRING
2018-12-03 16:59:06 +01:00
René Kijewski
c813a7ee82 embunit: const char * 2018-12-03 14:41:12 +01:00
Kevin "Bear Puncher" Weiss
f05852290a
Merge pull request #9236 from bergzand/pr/crypto/poly1305
crypto: Poly1305 implementation
2018-12-03 14:31:28 +01:00
Marian Buschsieweke
003c04bd4c
Merge pull request #10012 from gschorcht/drivers_sht3x
drivers: sht3x temperature and humidity sensor
2018-12-03 10:43:16 +01:00
d5c527161d
test/crypto: Add tests for poly1305
Tests are based on the tests vectors provided in RFC 7539
2018-12-03 09:31:10 +01:00
731ceda2f7
crypto/poly1305: Initial import
poly1305 implementation strongly based on
https://github.com/floodyberry/poly1305-donna
2018-12-03 09:31:09 +01:00
Juan I Carrano
77c9cc4041
Merge pull request #10219 from bergzand/pr/crypt/helper_add_wipe
crypto/helper: Add secure wipe function
2018-11-30 11:32:45 +01:00
Martine Lenders
959087f207 gnrc_netif_hdr: make input parameters constant 2018-11-30 10:01:52 +01:00
Martine Lenders
92fd8c12de ethernet: make input parameter const 2018-11-29 22:57:15 +01:00
b59bfd5554
Merge pull request #10505 from miri64/gnrc_mac/fix/header-includes
gnrc_mac: fix header includes
2018-11-29 22:02:46 +01:00
Martine Lenders
6dcf8aad69 gnrc_ipv6_nib: remove ESP-Now related code-duplication 2018-11-29 15:32:29 +01:00
Martine Lenders
6547b2185b gnrc_netif: remove ESP-Now related code-duplication 2018-11-29 15:32:09 +01:00
Martine Lenders
03b91cbcb8 esp_now: use NETDEV_TYPE_ESP_NOW as device type 2018-11-29 13:35:20 +01:00
Martine Lenders
9d6a32b551 gnrc_mac: fix header includes
The inclusion of `net/gnrc.h` in `net/gnrc/mac/types.h` header makes it
impossible to include the `net/gnrc/netif.h` header within
`net/gnrc/netif/hdr.h`, due to `net/gnrc/mac/types.h` being included
with `net/gnrc/netif/mac.h` (which is included in `net/gnrc/netif.h`)
2018-11-29 12:39:34 +01:00
Ken Bannister
bec94b0b7a net/gcoap: allow NULL path in gcoap_req_init() 2018-11-28 13:20:22 -05:00
Martine Lenders
48aeba534b
Merge pull request #10455 from haukepetersen/opt_gnrc_netifgetiid
net/gnrc_netif: opt of _ipv6_get_iid()
2018-11-27 22:34:35 +01:00
Martine Lenders
310ef3c29e
Merge pull request #10227 from miri64/gnrc_rpl_srh/enh/cleanup-handler
gnrc_rpl_srh: cleanup and optimize SRH processing function
2018-11-27 16:41:44 +01:00
Juan I Carrano
050e06f20f
Merge pull request #10376 from cladmi/pr/crypto/ccm/const_input
crypto/modes/ccm: update api to const input buffers
2018-11-27 15:33:00 +01:00
Juan I Carrano
d3e9eec8fe
Merge pull request #10060 from cladmi/pr/tests/build_system_checks
static_tests: add build system checks
2018-11-27 15:20:45 +01:00
Martine Lenders
cdfe8ad90c gnrc_ndp: make compilable for router without ARSM
While it is an edge case in our configuration it is technically
possible for a (6Lo) router not to maintain an address resolution state
machine. This fix allows for that with the `gnrc_ndp` module.
2018-11-26 15:53:21 +01:00
Ken Bannister
8fa6f10f97 cord/ep: Update for gcoap API change 2018-11-24 07:09:25 -05:00
Ken Bannister
424a01ddc1 net/gcoap: remove gcoap attributes from coap_pkt_t 2018-11-24 07:09:25 -05:00
Ken Bannister
034c78d51c net/gcoap: move macros to implementation file 2018-11-24 07:09:25 -05:00
Ken Bannister
f0b966d65d net/gcoap: Use nanocoap options API
Observe still uses coap_pkt_t attribute.
2018-11-24 07:09:25 -05:00
Ken Bannister
fa5ab4eeb6 net/gcoap: Add format option to nanocoap 2018-11-24 07:09:25 -05:00
Martine Lenders
d8317580df gnrc_rpl_srh: uncrustify code 2018-11-23 13:56:55 +01:00
Martine Lenders
0982ab4bd6 gnrc_rpl_srh: give variables more speaking names 2018-11-23 13:56:55 +01:00
Martine Lenders
eaacda0970 gnrc_rpl_srh: move address check to own function 2018-11-23 13:56:55 +01:00
Martine Lenders
c3b0e54d82 gnrc_rpl_srh: change routing header at latest possible point 2018-11-23 13:56:55 +01:00
Martine Lenders
29ed9a0937 gnrc_rpl_srh: use memcpy() instead for address assignment 2018-11-23 13:56:54 +01:00
Martine Lenders
caeebd2787 gnrc_rpl_srh: make seg_left > 0 a precondition
The generic routing header handler is already checking this case, so
don't redo the check again.
2018-11-23 13:56:54 +01:00
Martine Lenders
61b829b656 gnrc_rpl_srh: reorder variables for better memory usage 2018-11-23 13:56:54 +01:00
Martine Lenders
78164977d8
Merge pull request #10223 from kb2ma/nanocoap/string_opt_first_char
net/nanocoap: fix string option separator write handling
2018-11-22 16:43:45 +01:00
Hauke Petersen
ace5db70e8 net/gnrc_netif: opt of _ipv6_get_iid() 2018-11-22 15:30:11 +01:00
Ken Bannister
fa77929cc7 net/nanocoap: fix string option separator handling
Assumed initial character was a separator when writing the option,
and skipped over it.
2018-11-22 09:25:05 -05:00
José Alamos
1cb780ea26
Merge pull request #10447 from miri64/gnrc_pktbuf/feat/merge
gnrc_pktbuf: add gnrc_pktbuf_merge()
2018-11-22 13:58:14 +01:00
Martine Lenders
8644b5c33e gnrc_pktbuf: fix documentation formatting on gnrc_pktbuf_merge() 2018-11-22 11:35:39 +01:00
Tobias Heider
f03247e752 gnrc_pktbuf: add gnrc_pktbuf_merge()
Co-Authored-By: Martine Lenders <m.lenders@fu-berlin.de>
2018-11-22 11:13:33 +01:00
Hauke Petersen
3df1a82ceb
Merge pull request #10437 from miri64/doc/fix/gnrc_netapi-author-tag
gnrc_netapi: move author tag into file context
2018-11-21 12:40:32 +01:00
Schorcht
d1fab30818 sys/auto_init: add SHT3X sensor driver auto init 2018-11-21 08:48:20 +01:00
Martine Lenders
8f5f4a370d gnrc_netapi: declare data for set function as const 2018-11-20 11:59:38 +01:00
Martine Lenders
633b876c92 gnrc_netapi: move author tag into file context
Otherwise, the authorship is associated with `GNRC_NETAPI_MSG_TYPE_RCV`
in the rendered doc.
2018-11-20 11:09:08 +01:00
MichelRottleuthner
e0e02c04c8
Merge pull request #10386 from PeterKietzmann/pr_puf_variables_move
sys/puf_sram: CPU specific variable allocation
2018-11-20 09:21:25 +01:00
PeterKietzmann
0be350e352 sys/puf_sram: CPU specific attributes for variables 2018-11-20 08:34:53 +01:00
Gaëtan Harter
c87fe94ec1
crypto/modes/ccm: update api to const input buffers
Input buffers are not modified, so can be declared const arguments.
2018-11-19 16:44:04 +01:00
Gaëtan Harter
9e6782afb4
crypto/modes/ccm: update internal functions to const input buffers
Input buffers are not modified, so can be declared const arguments.
This will allow using `const` inputs for `modes/ccm`.

Also say `iv` const even if not required for the api update, just because it is
the case.
2018-11-19 16:44:09 +01:00
Gaëtan Harter
9427371849
crypto/modes/ctr: update api to const input buffers
Input buffers are not modified, so can be declared const arguments.
This will allow using `const` inputs for `modes/ccm`.
2018-11-19 16:44:04 +01:00
cladmi
ebd438cb58
sys/shell: select sc_rtc on USEMODULE
sc_rtc.c should only be compiled if periph_rtc module is actually used.

In practice there was not linking error when PERIPH_OPTIONAL|_REQUIRED
was not set as shell_commands hides calling the functions with
'#ifdef MODULE_PERIPH_RTC'.
2018-11-19 16:00:43 +01:00
Martine Lenders
0bdbb68959 gnrc_ipv6: drop packets with unspecified destination
It just doesn't makes sense to handle them any further
2018-11-17 15:45:25 +01:00
Martine Lenders
0aa96a4579 gnrc_icmpv6_error: fix doc alignment 2018-11-17 15:45:25 +01:00
Martine Lenders
ef1132384a gnrc_icmpv6_error: check IPv6 header before starting to build
Check for:

 - if it exists (critical error condition -- non-IPv6 headers should
   not trigger these functions) => assert
 - if it has a multicast source (that shouldn't really happen but
   people might try weird stuff ;-)
 - if it has an unspecified source (can't determine receiver of error
   message => don't send it, don't build it)
2018-11-17 15:45:25 +01:00
Martine Lenders
d4f425bb00 gnrc_ipv6: allow for empty IPv6 header 2018-11-17 14:49:12 +01:00
Martine Lenders
3ec37acbd1 gnrc_ipv6: fix _fill_ipv6_hdr() for pure IPv6 packets
If a packet only contains IPv6 and IPv6 extension header snips (e.g. if
the IPv6 packet has no payload or if an extension header was not
pre-parsed)
2018-11-17 14:48:49 +01:00
Martine Lenders
e801829c7a gnrc_udp: send ICMPv6 error messages where appropriate 2018-11-16 17:39:16 +01:00
Martine Lenders
db2da19ea4 gnrc_ipv6: send IPv6 error messages where appropriate 2018-11-16 17:39:16 +01:00
Martine Lenders
04a2827089 gnrc_icmpv6_error: provide NOPs when compiled without module
This is aimed to make the usage code of this module more readable.
2018-11-16 17:39:16 +01:00
Martine Lenders
697ad17ed1 icmpv6_error: doc: provide better references to error codes 2018-11-16 17:39:16 +01:00
Martine Lenders
b99e9f4185 gnrc_icmpv6_error: append IPv6 and netif header before sending 2018-11-16 17:39:16 +01:00
Martine Lenders
d161379e47 gnrc_icmpv6_error: re-order header inclusions 2018-11-16 17:39:16 +01:00
Martine Lenders
0b4230e5f6 gnrc_icmpv6_error: fix and optimize pointer search in _param_prob_build 2018-11-16 17:39:16 +01:00
Martine Lenders
335342a466 gnrc_icmpv6_error: fix build function for send and recv order 2018-11-16 17:39:16 +01:00
Martine Lenders
f0da2a0cd7 gnrc_icmpv6_error: don't include netif header into fit 2018-11-16 17:39:16 +01:00
Martine Lenders
c4175a5e52 gnrc_icmpv6_error: adapt _fit() to get MTU from netif 2018-11-16 17:39:16 +01:00
Martine Lenders
c8c8564d51 gnrc_icmpv6_error: use netapi_dispatch_send instead of netapi_send 2018-11-16 17:39:16 +01:00
Martine Lenders
ba13d8f5bf gnrc_icmpv6_error: introduce debug messages 2018-11-16 17:39:15 +01:00
Martine Lenders
a7a8227e36 gnrc_icmpv6_error: centralize send function 2018-11-16 17:39:15 +01:00
Martine Lenders
36617f3733 gnrc_icmpv6_error: make input pointers constant 2018-11-16 17:39:15 +01:00
Martine Lenders
6ec456b0fc gnrc_icmpv6_error: don't release orig_pkt on error
The stack might still wants to do something with the packet after
copying it to the error message.
2018-11-16 17:22:20 +01:00
Martine Lenders
3b56c78a3b gnrc_icmpv6_error: make build functions private 2018-11-16 17:22:20 +01:00
Martine Lenders
a30bdebc2c gnrc_icmpv6_error: remove static inline from functions 2018-11-16 17:22:20 +01:00
a79d03835a
Merge pull request #10417 from bergzand/pr/pkt/mark_const
gnrc/pkt: Add const keyword to length functions
2018-11-16 16:19:18 +01:00
21202e7e18
gnrc/pkt: Add const keyword to length functions 2018-11-16 15:06:39 +01:00
Juan Carrano
3393dafe82 sys/crypto: configure AES via pseudomodules.
USEMODULE += crypto_aes_precalculated enables the precalculated T tables (the old
code).
USEMODULE += crypto_aes_unroll causes loops to be unrolled.
2018-11-15 18:25:26 +01:00
Oleg Artamonov
05fe168a1e sys/crypto: optimize AES 2018-11-15 18:21:17 +01:00
Martine Lenders
f2760c033c gnrc_pktbuf: deprecate gnrc_pktbuf_duplicate_upto 2018-11-13 18:05:09 +01:00
Sebastian Meiling
1f7ec9b208
Merge pull request #10334 from maribu/saul_rssi
{drivers/saul,sys/phydat}: Added RSSI sensor and dBm unit
2018-11-12 21:01:24 +01:00
00b6e46abc
Merge pull request #8114 from cladmi/pr/crypto/ccm/auth_data_len_upper_bound
crypto/ccm: fix auth_data_len check
2018-11-12 17:30:17 +01:00
Wentao Shang
3fd8276c37
crypto/ccm: fix auth_data_len upperbound value
RFC3610 states that len_encoding is only valid for "0x0001 ... 0xFEFF"

   If 0 < l(a) < (2^16 - 2^8), then the length field is encoded as two
   octets which contain the value l(a) in most-significant-byte first
   order.
2018-11-12 16:38:45 +01:00
Gaëtan Harter
f0e785a430
crypto/ccm: check ccm_compute_adata_mac return value
Return value was ignored but function could fail
2018-11-12 16:37:00 +01:00
Robin
e9047063ca gnrc_sock_[udp|ip]: store return value before release
sock_[udp|ip]_recv returns `pkt->size` after pkt was released via `gnrc_pktbuf_release(pkt)`.
This can result in wrong values returned by this functions and thus is not according to its sepecification.

Storing this values before releasing pkt returning the stored values should fix this.
2018-11-12 14:58:26 +01:00
Martine Lenders
98f42eeea8
Merge pull request #10356 from miri64/gnrc_ipv6_nib/fix/netif_queued
gnrc_ipv6_nib: provide interface on packet queueing
2018-11-09 17:47:12 +01:00
Martine Lenders
94549d136b gnrc_ipv6_nib_pl: return early if PL entry wasn't allocated 2018-11-09 15:40:46 +01:00
Martine Lenders
6d1a3caa26 gnrc_ipv6_nib: fix NULL pointer dereference 2018-11-09 15:39:41 +01:00