Cenk Gündoğan
3fd13b9a85
Merge pull request #10985 from miri64/gnrc_ipv6_nib/fix/delayed-na
...
gnrc_ipv6_nib: fix preparation of delayed NA
2019-02-12 20:47:42 +01:00
Gaëtan Harter
8e4b11cdd0
Merge pull request #10369 from miri64/gnrc_ipv6_nib/fix/arsm-16-bit
...
gnrc_ipv6_nib/arsm: ensure proper int width in backoff calculation
2019-02-12 17:54:52 +01:00
Martine Lenders
82001cfd79
gnrc_ipv6_nib: expose non-randomized part of NS-backoff calculation
...
This was primarily done so the backoff can be tested
2019-02-12 17:01:14 +01:00
Martine Lenders
1f4d57d608
gnrc_ipv6_nib/arsm: ensure proper int width in backoff calculation
...
Otherwise, the result might flow over on 8/16-bit platforms
2019-02-12 17:01:14 +01:00
Martine Lenders
aa953a40ea
gnrc_ipv6_nib: fix preparation of delayed NA
...
Currently the constructed NA for a delayed NA case is neither used nor
released nor does it get an IPv6 header to be used properly. This fixes
that case.
2019-02-12 14:12:59 +01:00
Cenk Gündoğan
fa48e662a7
Merge pull request #10998 from miri64/gnrc_ipv6_nib/fix/cache-out-loop-iteration
...
gnrc_ipv6_nib: fix iteration conditions for cache-out
2019-02-12 14:10:15 +01:00
Peter Kietzmann
892a37351a
Merge pull request #10946 from brummer-simon/gnrc_tcp-fix_syn_rcvd_packetloss_deadlock
...
gnrc_tcp: syn_rcvd pkt loss fix
2019-02-12 13:51:51 +01:00
Martine Lenders
877217663e
gnrc_ipv6_nib: add clarification to comment in cache-out
...
When working on the previous commit I was unsure if a
garbage-collectible entry should remain in the list, so I added this
comment so I don't have to wonder about this in the future ;-).
2019-02-12 12:06:45 +01:00
Martine Lenders
7fcc2ab5d6
gnrc_ipv6_nib: fix iteration conditions for cache-out
2019-02-12 12:06:04 +01:00
Cenk Gündoğan
ea7f7c2340
Merge pull request #10978 from miri64/gnrc_ipv6_nib/fix/release-when-full
...
gnrc_ipv6_nib: release packet when NC entry can't be added
2019-02-12 10:43:32 +01:00
Marian Buschsieweke
194d340a64
net/sixlowpan: Fixed calculation of fragment size
...
Fragment size calculation previously failed for devices that are able to
transmit bigger layer 2 PDUs that 802.15.4 devices. This commit fixes the issue.
2019-02-12 09:45:31 +01:00
8eb02b6cd1
Merge pull request #10975 from miri64/gnrc_ipv6_nib/fix/rm-nib-clean
...
gnrc_ipv6_nib/nc: remove from _next_removable on remove
2019-02-11 17:39:29 +01:00
Peter Kietzmann
63fd8bc89b
Merge pull request #7577 from miri64/gnrc_netif2/feat/ieee802154-dup-bcast
...
gnrc_netif_ieee802154: drop duplicate broadcast packets (optionally)
2019-02-11 09:42:06 +01:00
Martine Lenders
fd3f806e32
gnrc_ipv6_nib: release packet when NC entry can't be added
...
When the neighbor cache is full, the packet trying to resolve a
neighbor is not released.
This change fixes that.
2019-02-08 21:53:46 +01:00
Martine Lenders
660440c1c2
gnrc_ipv6_nib/nc: remove from _next_removable on remove
...
The `_next_removable` list manages the cache-out of the neighbor cache.
However, when a neighbor cache entry is removed, it is not removed
from that list, which may lead to a segmentation fault when that list is
accessed, since the whole entry (including its list pointer) is zeroed
after removal.
With this change the entry is removed from that list accordingly before
the zeroing happens.
2019-02-08 16:45:47 +01:00
cb457941db
gnrc: nib: fix DOXYGE -> DOXYGEN
2019-02-06 13:01:40 +01:00
Martine Lenders
43c2c728c9
gnrc_sixlowpan_iphc: fix _compressible()
...
When either `gnrc_sixlowpan_iphc_nhc` or `gnrc_udp` is not compiled
in `_compressible()` never returns `true`. This causes the
`dispatch` snip in `gnrc_sixlowpan_iphc_send()` to be of length 0,
meaning `dispatch->data` is `NULL`, causing possible crashes when
trying to send IPv6 packets over 6LoWPAN without NHC or UDP.
2019-02-05 15:22:41 +01:00
Simon Brummer
5dc3f8dc3d
gnrc_tcp: syn_rcvd pkt loss fix
2019-02-04 20:57:30 +01:00
Martine Lenders
985d98073f
gnrc_netif_ieee802154: drop duplicate broadcast packets (optionally)
2019-02-04 16:19:48 +01:00
Peter Kietzmann
2c5d1b013e
Merge pull request #10918 from maribu/cc110x_mtu
...
drivers/cc110x: Fixed MTU calculation
2019-02-04 09:44:10 +01:00
Marian Buschsieweke
dae680dcb2
sys/net: Added NETDEV_TYPE_CC110X to MTU init
2019-02-04 09:16:29 +01:00
Sebastian Meiling
734524aead
gomach: fix reassign before usage error
2019-02-01 11:25:27 +02:00
smlng
6d0384f068
netstats: collect layer 2 netstats in gnrc_netif
...
This the first step in moving the collection of layer 2 netstats from
the low level driver to a central location, ie. gnrc_netif, to avoid
code duplication.
2019-02-01 10:35:03 +02:00
Cenk Gündoğan
b3843daeb8
Merge pull request #10817 from miri64/gnrc_netif/enh/i10723
...
gnrc_ipv6_nib: use generated EUI-64 for ARO build and check
2019-01-29 22:49:41 +01:00
Martine Lenders
d680aeae07
gnrc_ipv6_nib: use gnrc_netif_get_eui64() for ARO build and check
2019-01-29 21:52:53 +01:00
Martine Lenders
0fa8419c4a
gnrc_netif: wrap _ipv6_iid_from_addr() around _eui64_from_addr()
2019-01-29 21:52:53 +01:00
Martine Lenders
16e7fc8336
gnrc_netif: introduce L2 address to EUI-64 conversion
2019-01-29 21:52:53 +01:00
Martine Lenders
a2b2f96fe3
gnrc_netif: rename _create_iid_from_short() to emphesize EUI-64
2019-01-29 21:52:53 +01:00
Martine Lenders
983b60dbd4
gnrc_rpl: do not assert netif on auto-init
...
`gnrc_networking` is unusable when compiled for boards that do not have
any network devices on-board due to an assertion in RPL's auto-init. I
think this is pretty harsh. A friendly info message is enough, as it
might not even be an error. Also, if one expects RPL to work without
network interfaces they are a fool ;-).
2019-01-29 17:56:58 +01:00
Martine Lenders
2d54069f59
Merge pull request #10869 from gschorcht/gnrc_icmpv6_echo_fix
...
gnrc_icmpv6_echo: avoid crashing when pktbuf full
2019-01-25 18:33:07 +01:00
b8565e492d
Merge pull request #10851 from miri64/tests/feat/gnrc_sixlowpan_frag-tests
...
tests: provide unittests for gnrc_sixlowpan_frag/rbuf
2019-01-25 17:55:28 +01:00
Gunar Schorcht
c88838f391
gnrc_icmpv6_echo: avoid crashing when pktbuf full
...
Once the packet buffer is full on heavy network load, gnrc_netif_hdr_build may return NULL. In that case, the following unchecked access to hdr->data leads to a crash.
2019-01-25 17:10:57 +01:00
Martine Lenders
7d9ef9f78c
gnrc_sixlowpan_frag/rbuf: add offset assertion to rbuf_add()
...
`gnrc_sixlowpan_frag` internally derives the offset value directly
from the fragment header, so for normal usage within GNRC this
assertion is redundant, but to make the tests of `rbuf_add` 100%
water-tide I added it.
2019-01-25 16:57:09 +01:00
Martine Lenders
892c7a5430
Merge pull request #10866 from miri64/gnrc_sixlowpan/fix/type-finding-loop
...
gnrc_sixlowpan: stop type-finding loop when type is found
2019-01-25 14:38:34 +01:00
Martine Lenders
879321d68a
gnrc_sixlowpan: stop type-finding loop when type is found
...
Currently the loop just continues to run after a viable type is found.
In #10851 this lead to a crash of the tests, when the dependency of
`gnrc_sixlowpan` to `gnrc_ipv6` was removed.
2019-01-25 12:04:30 +01:00
Martine Lenders
b0beba3c1c
gnrc_ipv6_nib: release when not queuable on AR
...
When a new queue entry is tried to be allocated for a neighbor who's
address is currently tried to be resolved there was no error case
before. The packet that was tried to be put in the queue was thus not
released and stayed in the packet buffer for ever.
2019-01-25 00:13:21 +01:00
Martine Lenders
8c1cf53d28
gnrc_icmpv6: release when received packet too short
2019-01-24 15:50:18 +01:00
Martine Lenders
bbde73eb81
gnrc_icmpv6: release on wrong checksum
2019-01-24 14:57:36 +01:00
Martine Lenders
1370099435
gnrc_sixlowpan_frag/rbuf: provide helper functions for testing
2019-01-23 20:00:07 +01:00
Martine Lenders
4c1d1424c0
gnrc_sixlowpan_frag: release for fragment too big error case
...
The fragment is released for all other error cases, just not this one.
2019-01-23 18:05:37 +01:00
shuguo
4a4e552cca
gnrc_lwmac: enable duty-cycle printing.
2019-01-22 21:24:00 +08:00
Martine Lenders
d3f8739a1e
Merge pull request #5949 from zhuoshuguo/add_timeout_module_to_gnrc_mac
...
gnrc_mac: add timeout module.
2019-01-22 10:34:30 +01:00
zhuoshuguo
79e5586d0c
gnrc_mac: add timeout module.
...
Co-Authored-By: zhuoshuguo <zhuosgzju@gmail.com>
2019-01-21 22:46:10 +08:00
Cenk Gündoğan
82f30fd8c4
Merge pull request #10514 from miri64/pkg/enh/nordic-softdevice-ble-mac48
...
pkg/nordic_softdevice_ble: Use MAC48 as hardware address
2019-01-17 19:22:36 +01:00
Martine Lenders
7f7bc8fc20
pkg/nordic_softdevice_ble: Use MAC48 as hardware address
...
This is just a compatibility issue waiting to happen as soon as there
is support for a more standard-compliant implementation of BLE (like
e.g. NimBLE ;-)).
2019-01-17 18:08:55 +01:00
c0785df050
Merge pull request #10786 from kaspar030/fix_pktbuf_empty_memcpy
...
gnrc/pktbuf: avoid memcpy if size <= 0
2019-01-16 18:34:23 +01:00
Cenk Gündoğan
b24a8fbf3a
Merge pull request #10524 from miri64/gnrc_netif/enh/centralize-dev-type-functions
...
gnrc_netif: centralize device-type-specific functions
2019-01-16 16:44:43 +01:00
a2d679c76f
gnrc/pktbuf: avoid memcpy if size <= 0
2019-01-16 16:13:14 +01:00
Martine Lenders
55b9757044
gnrc_netif: centralize function to init IPv6 MTU
2019-01-16 15:52:54 +01:00
Martine Lenders
ea9bbd72b8
gnrc_netif: centralize function to get l2addr NETOPT
2019-01-16 15:52:54 +01:00
Martine Lenders
8f763535ac
gnrc_netif: centralize S/TLLAO length to address length function
...
The function to infer the link-layer address length from the length of
a S/TLLAO is very dependent on the IPv6 over X specification and thus
should be grouped with the other IP over X functions.
2019-01-16 15:52:53 +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
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
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
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
481f742c71
gnrc_netif: interface configuration for 6LoENC
2019-01-04 13:32:24 +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
45b9dd6f50
gnrc_netif: implement get NETOPT_6LO
2019-01-03 16:21: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
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
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
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
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
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
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
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
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
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
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
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
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
Martine Lenders
a7e3791f3b
gnrc_sixlowpan_iphc: allow address compression for non-IEEE802.15.4
2018-12-07 13:03:40 +01:00
Hauke Petersen
ec37ff5825
gnrc/netif: use eui48_x() for IID handling
2018-12-06 22:02:01 +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
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
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
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
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
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
Hauke Petersen
ace5db70e8
net/gnrc_netif: opt of _ipv6_get_iid()
2018-11-22 15:30:11 +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
Martine Lenders
8f5f4a370d
gnrc_netapi: declare data
for set function as const
2018-11-20 11:59:38 +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
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
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
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
Martine Lenders
ce0c46836c
gnrc_ipv6_nib: provide interface on packet queueing
...
Without this the first packet to a new link-local address will not be
delivered in non-6Lo environments, since the interface is not provided.
With this change, if an internet was provided to the address resolver it
will be stored within an allocated `gnrc_netif_hdr_t`.
At this point [IPv6 already striped](netif strip) the packet of its
netif header, so there is no risk that there will be to, in case it was
provided and the `netif` came from its existence.
2018-11-09 12:56:20 +01:00
60a6e66f77
Merge pull request #10246 from miri64/gnrc_ipv6/fix/encaps-ipv6-recursion
...
gnrc_ipv6: don't recurse into receive for encapsulated IPv6
2018-11-08 12:34:40 +01:00
Martine Lenders
d54ac38f84
gnrc_ipv6: don't dispatch encapsulated IPv6 headers in central function
...
Otherwise, an encapsulated IPv6 packet is handled twice. Once in the
central function, once in the specialized decapsulation.
2018-11-08 11:54:05 +01:00
Martine Lenders
160ccbcf7e
gnrc_ipv6: don't recurse into receive for encapsulated IPv6
...
`_decapsulate()` is called by callees of `_receive()` so the call to
the latter function within the first creates a recursion we don't want.
Using `gnrc_netapi` instead removes that and provides the added benefit
that other subscribers to IPv6 are also informed.
2018-11-08 11:54:05 +01:00
152a9dc325
Merge pull request #10247 from miri64/ipv6_ext_rh/cleanup/central-types
...
ipv6_ext_rh: define type numbers at central place
2018-11-06 20:31:27 +01:00
Joakim Nohlgård
52ac53b4d9
gnrc_netif_ieee802154: Provide LQI, RSSI in raw mode via netif_hdr
...
Useful in sniffer situations to see the signal strength of a received
packet. Also avoids the crash described in
https://github.com/RIOT-OS/applications/pull/54
2018-10-27 00:22:51 +02:00
Martine Lenders
a5c9f959b5
gnrc_ipv6: use gnrc_pktbuf_reverse_snips()
2018-10-25 23:11:33 +02:00
Martine Lenders
ac54a2d2b2
gnrc_pktbuf: add gnrc_pktbuf_reverse_snips() helper function
...
This allows for
a) testing the packet reversal properly in unittests
b) use it in other places than `gnrc_ipv6`'s receive function
2018-10-25 23:11:33 +02:00
Martine Lenders
274371c174
ipv6_ext_rh: switch over to generic RH type define
2018-10-25 19:21:20 +02:00
Martine Lenders
466bc341a6
Merge pull request #10231 from miri64/gnrc_ipv6_ext/enh/move-rh-to-gnrc
...
gnrc_ipv6_ext: move ipv6_ext_rh (partly) to GNRC
2018-10-25 19:15:22 +02:00
Gaëtan Harter
c5deac4865
Merge pull request #10023 from miri64/gnrc_netif/fix/no-addr-but-addr-len
...
gnrc_netif: Fix l2addr_len > 0, but no l2addr edge-case
2018-10-25 14:31:32 +02:00
Martine Lenders
6a9adf2b59
gnrc_ipv6_ext: remove unnecessary return-value indirection
...
Those return values are internal anyway, and they have the same intent
as the one provided by `gnrc_ipv6_ext_rh`.
2018-10-25 11:12:14 +02:00
Martine Lenders
84a62da102
gnrc_ipv6_ext_rh: rename GNRC_IPV6_EXT_RH_OK for clarity
2018-10-25 11:11:50 +02:00
Martine Lenders
c54ba49e82
gnrc_ipv6_ext: move ipv6_ext_rh (partly) to GNRC
2018-10-25 11:10:25 +02:00
Kevin "Bear Puncher" Weiss
7187bbf8cf
Merge pull request #9426 from gschorcht/esp32
...
ESP32 port
2018-10-16 15:24:25 +02:00
Schorcht
3ac99877ac
cpu: add esp32
2018-10-08 12:20:49 +02:00
Peter Kietzmann
ed24d3622a
Merge pull request #9621 from bergzand/pr/netif/use_fmt
...
gnrc_netif: Use fmt for bytes to hex string
2018-10-04 14:34:37 +02:00
0d71c1ccf7
gnrc_netif: Use fmt for bytes to hex string
2018-10-04 13:34:18 +02:00
90ad1a0782
gnrc_netif_ieee802154: remove state access in recv
...
This replaces the netif->state accesses in netif::recv with a netdev call
and the new netif RAWMODE flag
2018-10-03 21:00:35 +02:00
3c032e5688
gnrc_netif: add rawmode flag
...
Adds a gnrc_netif specific rawmode flag to indicate that the netdev
device is configured in raw mode. This flag is kept in sync with a
possible flag in the netdev device and should only be modified via the
setter call.
2018-10-03 20:59:03 +02:00
chrysn
f07308b07d
gnrc: Extend gnrc_ipv6_get_header checks, use in sock recv
...
gnrc_sock_recv used to duplicate functionality of gnrc_ipv6_get_header,
but additionally checked whether the IPv6 snip is large enough.
All checks are now included in gnrc_ipv6_get_header, but as most of them
stem from programming / user errors, they were moved into asserts; this
constitutes an API change.
2018-09-28 19:40:59 +02:00
Martine Lenders
05aa8ab66b
gnrc_netif: assert that l2addr_len is 0 without address
...
If the device provides an address length, but no address it is
obviously faulty.
2018-09-25 18:45:32 +02:00
smlng
59e299635b
cppcheck: add/correct reason for cppcheck-suppress
...
Adding and correcting description/rational on why certain cppcheck
warnings or errors are intentionally suppressed.
2018-09-25 12:03:58 +02:00
05b6af466c
sys: add missig <string.h> includes
2018-09-20 23:47:40 +02:00
Martine Lenders
235661668d
gnrc_ipv6_nib: always configure 802.15.4 long address
...
Our `gnrc_minimal` example configures the link-local address from the
IEEE 802.15.4 short address since it does not include 6Lo-ND.
This causes the application to be incompatible with our other GNRC
application that do include 6Lo-ND, since it [assumes][1] the link-local
address to be based on the EUI-64 for address resolution.
This enforces long addresses (aka EUI-64) for all IEEE 802.15.4 devices
when IPv6 is compiled in so `gnrc_minimal` is compatible again to the
rest.
Fixes #9910
[1]: https://tools.ietf.org/html/rfc6775#section-5.2
2018-09-10 17:08:04 +02:00
Martine Lenders
3d9aad2027
Merge pull request #9854 from bergzand/pr/rpl/pass_opt_len
...
gnrc_rpl: Pass options length to msg validator
2018-09-03 14:20:12 +02:00
af3232fb34
gnrc_rpl: Pass options length to msg validator
...
Currently the length of the full ICMPv6 packet is passed to the
validator function causing validation failures on valid packets. This
fixes that by passing the length of remaining RPL options of the packet.
2018-08-29 00:47:20 +02:00
0c790c6638
gnrc_rpl: fix zeroing of RPL DIS fields
...
The code originally assumed that the location of DIS struct is directly
after the ICMPv6 struct. This is not necessarily true when both structs
are individually allocated by pktbuf. This commit fixes this issue by
directly accessing the location of the DIS struct.
2018-08-29 00:33:27 +02:00
Joakim Nohlgård
6d6a6efac7
gnrc_netif: Check return value of netdev init during thread start
2018-08-24 12:11:12 +02:00
Martine Lenders
a9d0f20c7e
Merge pull request #8626 from miri64/gnrc_sixlowpan_iphc/enh/clean-up-nhc
...
gnrc_sixlowpan_iphc: cleanup NHC encoding
2018-08-17 10:13:34 +02:00
Martine Lenders
0a9793c49b
gnrc_sixlowpan_iphc: cleanup NHC encoding
2018-08-16 16:55:28 +02:00
Joakim Nohlgård
3cc088689e
6lo: Speling correction in comment
2018-08-14 10:08:52 +02:00
Joakim Nohlgård
58281e9135
6lo: Set more data flag on all but last frag
2018-08-14 10:08:17 +02:00
Joakim Nohlgård
a247d8bfa5
gnrc_netif_ieee802154: set Frame Pending bit sometimes
...
Set frame pending bit in IEEE 802.15.4 FCF when
GNRC_NETIF_HDR_FLAGS_MORE_DATA is set on the netif header on outbound
frames.
2018-08-13 09:27:18 +02:00
Martine Lenders
4f87883ab8
gnrc_ipv6_nib: fallback to SLAAC if ARO is ignored by upstream
...
Linux doesn't have ARO support at the moment so this is a workaround to
try to speak 6Lo-ND while still being able to do DAD with a border
router that doesn't.
2018-08-09 10:56:36 +02:00
Gaëtan Harter
a7241384be
Merge pull request #9719 from miri64/gnrc_ipv6_nib/enh/emit-conf
...
gnrc_ipv6_nib: make automatic NDP packet emission (NS/RS) configurable
2018-08-07 17:55:00 +02:00
Martine Lenders
ad173831db
Merge pull request #9721 from smlng/pr/gnrc_udp/assert
...
gnrc_udp: assert ports not zero
2018-08-06 16:59:55 +02:00
smlng
d4e8c57621
gnrc_netif: generalise address search functions
...
Reduce code duplication by combining internal helper functions
that either loop over interface addresses or multicast groups.
2018-08-06 16:28:48 +02:00