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

2692 Commits

Author SHA1 Message Date
Cenk Gündoğan
16e1f972ab
Merge pull request #9424 from miri64/gnrc_sixlowpan_frag/enh/async-gc
gnrc_sixlowpan_frag: add asynchronous rbuf GC
2018-07-03 11:45:52 +02:00
Martine Lenders
254f16e81f gnrc_sixlowpan_frag: add asynchronous rbuf GC
While the current approach for garbage collection in the 6Lo reassembly
buffer is good for best-effort handling of
*fragmented* packets and nicely RAM saving, it has the problem that
incomplete, huge datagrams can basically DoS a node, if no further
fragmented datagram is received for a while (since the packet buffer is
full and GC is not triggered).

This change adds a asynchronous GC (utilizing the existing
functionality) to the reassembly buffer, so that even if there is no new
fragmented packet received, fragments older than `RBUF_TIMEOUT` will be
removed from the reassembly buffer, freeing up the otherwise wasted
packet buffer space.
2018-07-03 10:25:25 +02:00
Cenk Gündoğan
bf33941819
Merge pull request #9434 from miri64/gnrc_pktbuf_static/fix/alignment-race
gnrc_pktbuf_static: fix alignment issue / leaks
2018-07-02 16:32:13 +02:00
Cenk Gündoğan
32e823acb2
Merge pull request #9447 from miri64/gnrc_sixlowpan_frag/enh/add-cur-size
gnrc_sixlowpan_frag: add current_size to exposed struct
2018-07-02 14:05:40 +02:00
Joakim Nohlgård
bbf4f1e453 gnrc_netif: Enable RX and TX complete events after netdev init 2018-06-29 21:53:23 +02:00
Martine Lenders
cb74063573 gnrc_sock_udp: use sock's local end-point for listening
Without this fix the listener doesn't actually listen on the
(potentially) ephemeral port introduced in #9382, but on port 0 which is
wrong.
2018-06-28 17:25:26 +02:00
Martine Lenders
68fe6682ff gnrc_sixlowpan_frag: add current_size to exposed struct
Since IPHC also manipulates the total number of bytes of a received
datagram (by decompressing it), this also needs to be exposed. I guess
I was too focused on introducing a *generic* packet buffer for a future
virtual reassembly buffer (where it isn't needed, but so isn't `pkt` to
be honest), that I totally forgot about it in #9352.
2018-06-28 12:28:51 +02:00
Martine Lenders
acfe57a52b gnrc_pktbuf_static: reduce checks to be in line with new alignment 2018-06-27 17:19:34 +02:00
Martine Lenders
8a75d8d189 gnrc_pktbuf_static: fix alignment issue / leaks
This fixes an alignment issue I encountered in the static version of
the packet buffer.

The bug is caused by a race-condition where a certain order of
operations leads to a chunk being released according to the
byte-alignment of the platform, but overlapping potential space for
a future `_unused_t` struct e.g. (x mark allocated regions):

                    Future leak of size sizeof(_unused_t)       Time
                    v                                            |
    +------------+-----+--------------------+                    |
    |xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|                    +
    +------------+-----+--------------------+                    |
                                                                 |
    +------------+--+--+--------------------+                    |
    |               |xxxxxxxxxxxxxxxxxxxxxxx|                    +
    +------------+--+--+--------------------+                    |
                                                                 |
    +-----+------+--+--+--------------------+                    |
    |xxxxx|         |xxxxxxxxxxxxxxxxxxxxxxx|                    +
    +-----+------+--+--+--------------------+                    |
                                                                 |
    +-----+------+-----+---------+----------+                    |
    |xxxxx|                      |xxxxxxxxxx|                    +
    +-----+------+-----+---------+----------+                    |
                                                                 |
    +-----+------+-----+--------------------+                    |
    |xxxxx|      |xxxxxxxxxxxxxxxxxxxxxxxxxx|                    +
    +-----+------+-----+--------------------+                    |
                                                                 |
    +------------+-----+--------------------+                    |
    |xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx|                    +
    +------------+-----+--------------------+                    |
                                                                 |
    +------------+-----+--------------------+                    |
    |xxxxxxxxxxxxxxxxxx|                    |                    +
    +------------+-----+--------------------+                    |
                                                                 |
    +------------+-----+--------------------+                    |
    |            |xxxxx|                    |                    +
    +------------+-----+--------------------+                    |
                                                                 v

Sadly, I wasn't able to create a reproducable unittest that show-cases
this corner-case, since I don't understand the order of operations that
cause this one 100%, but the bug is reproducable (but also not
reliably) by sending large (i.e. fragmented) packets to a 6Lo-enabled
host from more than 1 host simultaneously (use `gnrc_pktbuf_cmd` to
check).

By making the size of `_unused_t` the only condition for alignment,
this bug is fixed.
2018-06-27 17:18:24 +02:00
Cenk Gündoğan
315c201747
Merge pull request #9372 from miri64/gnrc_sixlowpan_frag/enh/i8511
gnrc_sixlowpan_frag: adapt for #8511
2018-06-26 19:47:25 +02:00
Martine Lenders
a2eb3c7f15 gnrc_sixlowpan_frag: adapt for #8511
This refactors the `gnrc_sixlowpan_frag` module for the API proposed
in #8511.

The `ctx` for `gnrc_sixlowpan_frag_send()` is required to be a
`gnrc_sixlowpan_msg_frag_t` object, so IPHC can later on use it to
provide the *original* datagram size (otherwise, we would need to adapt
the API just for that, which seems to me as convoluted as this
proposal).

I also provide an expose function with a future possibility to provide
more than just one `gnrc_sixlowpan_msg_frag_t` object later on (plus
having cleaner module separation in general).
2018-06-26 19:38:33 +02:00
Martine Lenders
0c9d7aeedc gnrc_rpl: exit early if netif_hdr is NULL in send function
Without this fix RPL might crash when the packet buffer is full.
2018-06-21 14:51:47 +02:00
Martine Lenders
579d9d78d4
Merge pull request #8823 from miri64/gnrc_ipv6_nib/feat/slaac
gnrc_ipv6_nib: add full RFC4862 DAD support
2018-06-21 14:10:36 +02:00
Cenk Gündoğan
d140aa1c8e
Merge pull request #9382 from miri64/sock/enh/i9376
sock_udp: allow creation with ephemeral ports
2018-06-21 12:16:40 +02:00
Cenk Gündoğan
0c428ecb2e gnrc_rpl: remove events from the queue before memset() 2018-06-21 10:41:13 +02:00
ddfc5843bb
Merge pull request #9086 from bergzand/pr/nanocoap_sock/client_split
nanocoap_sock: split generic request function of from nanocoap_get
2018-06-20 23:31:05 +02:00
Martine Lenders
a33399edf7 gnrc_sock_udp: provide fix for error state for full port pool 2018-06-20 14:51:18 +02:00
Martine Lenders
f8524cb4c0 gnrc_sock_udp: provide port for #9376 API fix 2018-06-20 14:51:17 +02:00
Cenk Gündoğan
e08fd546cf
Merge pull request #9353 from miri64/gnrc_sixlowpan/opt/rm-pad
gnrc_sixlowpan: fix order of gnrc_sixlowpan_msg_frag_t
2018-06-18 10:59:27 +02:00
Cenk Gündoğan
acb9e4aed2
Merge pull request #9352 from miri64/gnrc_sixlowpan_frag/enh/expose-rbuf
gnrc_sixlowpan_frag: expose (parts of) reassembly buffer
2018-06-18 10:55:13 +02:00
Ken Bannister
4f8c3b7d18
Merge pull request #9310 from miri64/gcoap/enh/clients-without-response-handlers
gcoap: don't allocate memo for clients without response handlers
2018-06-15 10:28:30 -04:00
Martine Lenders
b03aa528e8 gcoap: don't allocate memo for clients without response handlers 2018-06-15 09:46:50 +02:00
Joakim Nohlgård
8514ff5f15 gnrc/pktbuf: Const correctness on gnrc_pktbuf_add 2018-06-15 00:44:23 +02:00
Martine Lenders
2c9ee62eb0 gnrc_sixlowpan: fix order of gnrc_sixlowpan_msg_frag_t
While working on #9352 I noticed that the order of members in the
`gnrc_sixlowpan_msg_frag_t` struct costs us 4 bytes in RAM due to byte
alignment. This PR fixes the order of members, so they are the most
packed.
2018-06-14 17:35:29 +02:00
Martine Lenders
86cbde2db5 gnrc_sixlowpan_frag: expose (parts of) reassembly buffer
This exposes the parts of the reassembly buffer to be usable as context
as proposed in #8511.

I only exposed *parts of* for two reasons:

1. I don't need to expose further types (like `rbuf_int_t`), that are
   not of interest outside of fragmentation.
2. This allows for an easy future extension for the virtual reassembly
   buffer as proposed in [[1]].

This makes this change a little bit more involved, because instead of
just renaming the type, I also need to add the usage of the `super`
member, but I think in the end this little preparation work will be
beneficial in the future.

[1]: https://tools.ietf.org/html/draft-watteyne-6lo-minimal-fragment-01#section-3
2018-06-14 17:22:58 +02:00
Martine Lenders
e91e0a7807
Merge pull request #9261 from kb2ma/gcoap/refine_re-register
net/gcoap: Refine Observe re-registration
2018-06-13 16:05:40 +02:00
7d013eb2b6 sys: fix doxygen grouping 2018-06-11 19:12:02 +02:00
Martine Lenders
ec5ca98b4d
Merge pull request #9320 from brummer-simon/gnrc_tcp-set_ip_src_addr_directly
gnrc_tcp: Set src addr in outgoing packets by tcp layer.
2018-06-11 14:20:21 +02:00
Ken Bannister
43db2715cd net/nanocoap: create pkt-based request
Includes string and uint options.
2018-06-10 08:44:16 -04:00
Simon Brummer
370fe1e475 gnrc_tcp: Set src addr in outgoing packets by tcp layer. 2018-06-10 13:26:23 +02:00
Cenk Gündoğan
c135f2639e
Merge pull request #9300 from miri64/gnrc_ipv6_nib/fix/rtr-timeout-wrong-ctx
gnrc_ipv6_nib: use router instead of netif for router timeout context
2018-06-07 13:40:48 +02:00
Hauke Petersen
36ecaa6e4b net/emcute: use global byteorder functions 2018-06-07 12:10:58 +02:00
Martine Lenders
b6ab9eb343 gnrc_ipv6_nib: use router instead of netif for router timeout context
`GNRC_IPV6_NIB_RTR_TIMEOUT` [expects a default router entry][doc] as
context, so using the `netif` here is clearly wrong. This causes the
hardfault described in #9297.

[doc]: http://doc.riot-os.org/group__net__gnrc__ipv6__nib.html#ga1c7e892ef6533f699c4e64737c2847c2
2018-06-06 11:37:51 +02:00
Ken Bannister
2c02ed2093 net/gcoap: refine observe re-registration
Fix re-register when using the same token.
Handle edge cases when change token for a resource.
Only set observer and resource on initial registration.
Discuss re-registration in documentation.
2018-06-05 09:23:16 -04:00
BytesGalore
0c034c9220 rpl: add DIS Solicited Information option 2018-06-04 18:10:22 +02:00
Martine Lenders
22ad3aa12e gnrc_ndp: only send RAs when VALID address is found
Otherwise, it may happen that `::` or a global address is chosen by
the IPv6 header fill function. Both types of addresses are
[not valid for RAs](https://tools.ietf.org/html/rfc4861#section-4.2)
2018-05-31 17:11:26 +02:00
Martine Lenders
55adbee488 gnrc_ipv6_nib: add full RFC4862 DAD support
Parts of [RFC4862] were already implemented when NDP via the NIB was
first implemented. This change just includes the DAD portion of
[RFC4862]. This should be enough to make RIOT fully RFC4862 compliant.

[RFC4862]: https://tools.ietf.org/html/rfc4862
2018-05-31 17:11:25 +02:00
Martine Lenders
57d3c4698c gcoap: don't drop observer on re-register
With #9209 gCoAP got the ability to re-register and OBSERVE with a new
token, sadly the `observer` variable wasn't set in that fix, so a
re-registration actually led to the deletion of the observer (because it
is still `NULL` when the old registration is overwritten in l. 317)
2018-05-30 23:05:25 +02:00
Martine Lenders
fce5c758f7
Merge pull request #8841 from miri64/netif/api/initial2
netif: Initial import of a common network interface API (second try)
2018-05-29 22:10:50 +02:00
Martine Lenders
2586b5c161
Merge pull request #9233 from brummer-simon/gnrc_tcp-handle_link_local_addr
gnrc_tcp: handle link local IPv6 addresses correctly
2018-05-29 21:50:00 +02:00
Simon Brummer
686aabaa0a gnrc_tcp: handle link local IPv6 addresses correctly 2018-05-29 21:28:32 +02:00
5be4b7f5c8
Merge pull request #9226 from miri64/gnrc_netif/enh/error-on-multicast-space
gnrc_netif: fail IPv6 address addition if no space for solicited nodes
2018-05-29 20:30:26 +02:00
Ken Bannister
341debd5e0
Merge pull request #9209 from kb2ma/gcoap/observe_change_token
net/gcoap: Observer re-register with new token
2018-05-29 18:06:07 +00:00
Martine Lenders
a082e10157 gnrc_netif: add GNRC specific implementation of netif.h 2018-05-29 19:49:29 +02:00
Martine Lenders
ea64d39e21 gnrc_netif: fail IPv6 address addition if no space for solicited nodes 2018-05-29 19:30:30 +02:00
Ken Bannister
d7dde2dded net/gcoap: observer re-register with new token 2018-05-29 13:30:05 -04:00
Martine Lenders
d3d7a49d7a gnrc_netreg: make message queue requirement more visible 2018-05-29 19:21:48 +02:00
Cenk Gündoğan
5230e7732c
Merge pull request #9188 from miri64/gnrc_pktdump/enh/print-rest
gnrc_pktdump: print rest of snip as hex if available
2018-05-29 13:32:39 +02:00
Martine Lenders
8c77cbb903 gnrc_pktdump: print rest of snip as hex if available
Currently, `gnrc_pktdump` only prints the header part of a snip.
However, if the snip wasn't parsed yet by the corresponding GNRC
module (or the module doesn't exist because the node is e.g. just a
forwarder), additional data might not be printed.

This makes it hard to analyze the data properly (sometimes you not only
want to know where the IPv6 packet is supposed to go, you also want to
know what's in it). So this just prints the rest of the snip as a hex
dump.
2018-05-29 12:33:06 +02:00
Hauke Petersen
7f2fb5e0a3 net/emcute: use correct number of retries
syncsend() is used also for the initial packet, so resending
while (retries <= EMCUTE_N_RETRY) is the correct behavior.
2018-05-28 11:41:20 +02:00
6bb8a5c145
nanocoap_sock: split request function from get
The nanocoap_get function is refactored to split of the request part
into a separate function for reuse by other modules. Support for
retransmissions when the received frame is malformed is dropped as it
was broken anyway.
2018-05-25 09:40:20 +02:00
Loïc Dauphin
260bc37958
Merge pull request #5914 from cgundogan/pr/ndn-riot_as_a_pkg
pkg: ndn-riot: initial import of ndn-riot as a package
2018-05-24 18:29:22 +02:00
smlng
1011803867 net/gnrc/rpl: fix doxygen grouping 2018-05-24 14:38:27 +02:00
Cenk Gündoğan
f64265de57 gnrc_pktdump: add hex dump for NDN 2018-05-24 10:58:26 +02:00
Sebastian Meiling
9d83b60f3b
Merge pull request #9083 from smlng/pr/gcoap/cleanup
gcoap: enhance gcoap_req_init
2018-05-23 10:40:54 +01:00
Cenk Gündoğan
441f11ea45 gnrc_rpl: shell: adapt to evtimer for RPL events 2018-05-23 09:42:12 +02:00
Cenk Gündoğan
b819ac8d35 gnrc_rpl: adapt to evtimer for RPL events 2018-05-23 09:42:12 +02:00
Cenk Gündoğan
4c9e947d43 gnrc_rpl: adjust author and copyright 2018-05-22 23:46:55 +02:00
smlng
b9ca8f466f gcoap: add asserts for path in gcoap_req_init 2018-05-22 21:28:58 +02:00
smlng
c9e9f72454 gcoap: use const path parameter 2018-05-22 21:28:58 +02:00
Bas Stottelaar
7781da7799 sys: netopt: add busy option 2018-05-21 16:37:38 +02:00
Bas Stottelaar
02395e593d sys: netopt: add checksum option 2018-05-21 16:37:38 +02:00
Gaëtan Harter
60d09e6b21
sys/icmpv6_hdr_print: replace PRIu8 by PRIu16
PRIu8 is not supported on samr21-xpro:

    type:   hu  code:   hu

After fix

    type: 133  code:   0

Found by running 'tests/gnrc_netif'
2018-05-11 17:41:25 +02:00
Martine Lenders
8a46cf611e gcoap: make message queue size configurable 2018-05-06 16:41:43 +02:00
Martine Lenders
3d821ee195 gnrc_rpl: remove route before updating it
The "new" forwarding table does not update an old route but just adds
another as long as it is not *exactly* the same. However, the RPL
adaptation missed to remove the old route so RPL got easily confused
about where it actually needed to send packets.
2018-05-04 17:46:02 +02:00
Sebastian Meiling
4f97fc76fd
Merge pull request #8894 from beduino-project/fix-gnrc_ipv6_blacklist-build
gnrc: fix build of gnrc_ipv6_blacklist when ENABLE_DEBUG is disabled
2018-04-23 14:26:53 +02:00
8475844213 sys/net/uhcpc: add missing stdio.h include 2018-04-16 23:06:15 +02:00
635e72db23
Merge pull request #8788 from kaspar030/nanocoap_add_serverside_block1
nanocoap: add serverside block1 support
2018-04-16 12:49:06 +02:00
4897222e7e nanocoap: add server-side block1 support 2018-04-16 12:31:56 +02:00
6ee4aceef1
Merge pull request #8936 from haukepetersen/opt_rdclisimple_addrconf
net/rdcli_simple: specify RD address as string
2018-04-12 15:33:33 +02:00
Martine Lenders
3be4b51209
Merge pull request #8867 from miri64/gnrc_ipv6/fix/possible-null-ptr-deref
gnrc_ipv6: fix possible NULL pointer dereference
2018-04-12 14:26:22 +02:00
Martine Lenders
7974b12c11
Merge pull request #8797 from zhuoshuguo/gomach_add_dutycycle_display_command
gnrc_gomach: add duty-cycle display shell command.
2018-04-12 14:25:02 +02:00
Hauke Petersen
2e6ccfa13f net/rdcli_simple_standalone: fix error handling 2018-04-12 14:00:32 +02:00
Hauke Petersen
bd25cf5902 net/rdcli_simple: parse RD address from string
this makes the configuration of the RD server much simpler, as it
does not require the user to 'binary-code' the RD server's address
anymore.
2018-04-12 14:00:32 +02:00
Hauke Petersen
faab006631 net/rdcli_simple: improved doc and error handling 2018-04-12 13:48:09 +02:00
d64d38b391
Merge pull request #8909 from miri64/doc/enh/ipv6-rfc
doc: update IPv6 RFC references
2018-04-12 12:11:23 +02:00
shuguo
4e7ff0df28 gnrc_gomach: enabling duty-cycle printing 2018-04-12 11:46:40 +02:00
shuguo
ed4a80db00 gnrc_mac: add MAC duty-cycle record macro 2018-04-12 11:44:30 +02:00
d2db1ba2c3
Merge pull request #8568 from miri64/gnrc_ipv6_nib/fix/abro-ignore-only-on-6lr
gnrc_ipv6_nib: only discard RAs without ABROs on 6LR
2018-04-11 22:32:33 +02:00
012c016b74
Merge pull request #8772 from kaspar030/rework_nanocoap_option_handling
net/nanocoap: rework option handling
2018-04-10 21:11:18 +02:00
dee793d29f nanocoap: rework option handling 2018-04-10 20:58:06 +02:00
Martine Lenders
23bdc80e22 doc: update IPv6 RFC references
RFC 2460 was obsoleted by RFC 8200. This PR changes the references
around, so we don't reference an obsoleted RFC ;-).

Also I'm moving these references from the old-style HTML-like format
to the newer-style Markdown-like format.
2018-04-10 15:40:18 +02:00
Martine Lenders
629a19dc87
Merge pull request #8871 from miri64/gnrc_netif/fix/unspec-addr
gnrc_netif: check if input for address search is ::
2018-04-10 14:35:07 +02:00
Hauke Petersen
7dd897c6d7 net/rdcli_common: fix EP name generation 2018-04-10 10:55:03 +02:00
Hauke Petersen
108284670c net: added RD client for simplified registration 2018-04-09 10:37:10 +02:00
Hauke Petersen
f12d85d032 net/rdcli: added common rdcli module 2018-04-09 10:37:10 +02:00
Martine Lenders
3c93ebc86e
Merge pull request #7699 from nmeum/gcoap-method-not-allowed
gcoap: return Method Not Allowed if appropriate
2018-04-06 15:35:05 +02:00
Sören Tempel
93f65043ce gnrc: fix build of gnrc_ipv6_blacklist when ENABLE_DEBUG is disabled
Without this commit it doesn't build because addr_str isn't defined when
ENABLE_DEBUG is not set.

This issue was introduced in: c001e14f9d
2018-04-06 14:48:32 +02:00
Hauke Petersen
49bd85d00a sys/net: added Skald
Skald is a very small and simple, TX-only BLE stack that supports
sending advertisements only. It is useful for building all kinds
of BLE beacons with very minimal memory footprints.
2018-04-06 11:18:53 +02:00
Hauke Petersen
4e715e8221 drivers/netdev: added BLE adaption for netdev 2018-04-06 11:18:53 +02:00
Robin Nehls
ad5617fb83 gnrc_ipv6: discard non-NONXT packets with 0 payload length
If the payload length is zero and the next header field is not set to
NONXT, GNRC will interpret the current header as the payload because the
first snip is always interpreted as the payload. This can lead to loops
and or crashes.
2018-04-03 18:34:48 +02:00
Martine Lenders
53c30eef4b gnrc_netif: check if input for address search is :: 2018-04-03 17:38:26 +02:00
Robin Nehls
326be16b90 gnrc_ipv6: fix possible NULL pointer dereference
When the payload length of an encapsulated IPv6 packet is 0, the
`_receive` function of IPv6 can be given a NULL pointer, causing the
IPv6 header checker to crash because of a NULL pointer dereference.
2018-04-03 14:46:12 +02:00
Ken Bannister
3da9145018 net/gcoap: Internalize definition of state struct 2018-03-31 06:46:05 -04:00
Hauke Petersen
a63f92a7a6 net/gcoap: allow to not define a response handler 2018-03-19 11:56:58 +01:00
Martine Lenders
ce807173ff
Merge pull request #8601 from bergzand/pr/netopt-link-status
netopt/drivers: Add phy link status output
2018-03-18 15:25:01 +00:00
831e7635de
netopt: Add link status option 2018-03-18 15:32:36 +01:00
1faa845d8e sys/net: iolist updates 2018-03-06 14:00:32 +01:00
2f179f26bb sys/net/gnrc/netif: adapt to netdev with iolist 2018-03-06 14:00:31 +01:00
b343ff8ac9
Merge pull request #8470 from miri64/gnrc_sock/enh/set-remote-netif-implicitly
gnrc_sock: set remote network interface implicitly
2018-03-06 12:27:00 +01:00
Martine Lenders
15d405f597 gnrc_sock: add more cppcheck suppressions 2018-03-06 12:20:56 +01:00
Martine Lenders
98e45c3d55 gnrc_sock: set remote network interface implicitly
When there is only one interface we are simplifying a lot for the users
if the interface is set implicitly.
2018-03-05 17:01:36 +01:00
Cenk Gündoğan
18005666ac
Merge pull request #8512 from miri64/gnrc_sixlowpan/enh/gnrc-dispatch
gnrc_sixlowpan: Introduce 6Lo GNRC dispatch sub-layer
2018-03-01 15:03:03 +01:00
Martine Lenders
67d7aeab7e gnrc_sixlowpan: Introduce 6Lo GNRC dispatch sub-layer
This abstracts the sending and receiving of 6Lo packets to the new
6Lo sub-layer model introduced in #8511 and exemplifies it as well.
2018-03-01 14:15:07 +01:00
Cenk Gündoğan
3bbc1d7e22
Merge pull request #8625 from miri64/gnrc_rpl/enh/leaf-non-routers
gnrc_rpl: allow for non-router operation (as leaf)
2018-03-01 10:28:49 +01:00
Martine Lenders
8c632b1bf7
Merge pull request #8536 from daniel-k/fix/gnrc_src_addr_selection
gnrc/netif: fix source address selection for non-matching prefixes
2018-02-27 19:02:54 +01:00
Martine Lenders
9c84cd90b8 gnrc_rpl: allow for non-router operation (as leaf) 2018-02-23 14:26:15 +01:00
Martine Lenders
2316d336da gnrc: keep speed optimizations of c2b403f4 2018-02-22 20:40:59 +01:00
Martine Lenders
467e9548cf gnrc_netreg: optimize gnrc_netreg_num() to use _netreg_lookup() 2018-02-22 20:39:23 +01:00
Martine Lenders
dbda759b40 Revert "gnrc/netreg: remove usages of gnrc_netreg_num"
This reverts commit c2b403f4ad.
2018-02-22 20:30:03 +01:00
Martine Lenders
49f80b7cf1 Revert "gnrc/netreg: remove gnrc_netreg_num"
This reverts commit c178ea8798.
2018-02-22 20:28:32 +01:00
Ken Bannister
d7004ebcd8
Merge pull request #8513 from kaspar030/nanocoap_add_context_to_resources
nanocoap: add context pointer to resources
2018-02-22 18:30:43 +00:00
Martine Lenders
26ad044e12
Merge pull request #8563 from miri64/gnrc_ipv6_nib/fix/6lo-tentative
gnrc_ipv6_nib_6ln: do not mark non-link-local addresses directly VALID
2018-02-19 15:28:08 +01:00
Martine Lenders
e11550042c gnrc_ipv6_nib_6ln: only register addresses not VALID yet
With the previous fix, we only have to register addresses that are not
VALID yet on reception of router advertisements. This removes the need
for the hacky `GNRC_NETIF_FLAGS_6LO_ADDRS_REG` flag that was only
introduced to prevent unnecessary re-registration.
2018-02-19 14:39:29 +01:00
Martine Lenders
8c8b6f9494 gnrc_ipv6_nib_6ln: do not mark non-link-local directly VALID
The whole address registration looses its point if all addresses are
marked valid from the get-go. With this fix non-link-local addresses
are first marked TENTATIVE and only after successful registration
marked as VALID. Link-local addresses are assumed to always be VALID.
2018-02-19 14:38:27 +01:00
Joakim Nohlgård
73c11a366c
Merge pull request #8430 from smlng/gcc7/ignore_fallthroughs
make: ignore fallthroughs errors with GCC 7.x
2018-02-19 11:04:16 +01:00
e2b6d6b89a
Merge pull request #8584 from miri64/gnrc_sock/fix/err-report-ptr
gnrc_sock: make sock compilable with gnrc_neterr
2018-02-19 09:51:09 +01:00
Martine Lenders
2621a57362 gnrc_sock: make sock compilable with gnrc_neterr
gnrc_sock currently does not compile with `gnrc_neterr` included, since
both `msg_try_receive()` and `msg_try_send()` expect a *pointer* to a
`msg_t`, not a `msg_t`.

To test, just compile an application using `gnrc_sock` (e.g.
`examples/gcoap`) with `USEMODULE+=gnrc_neterr`.
2018-02-17 13:53:38 +01:00
Ken Bannister
81ecd37a5e net/gcoap: fix sock send return type 2018-02-17 06:20:38 -05:00
Martine Lenders
3a8695bd0c gnrc_ipv6_nib: only discard RAs without ABROs on 6LR
[RFC6775] only talks of *routers* processing router advertisements,
with regards of discarding them if they do not contain an ABRO.

Additionally, this change makes configuration of tests setups a lot
easier, where one note is a router distributing a prefix and the other
is a host to be configured with the RA. Just do the following on the
router:

```
> ifconfig <if> add <GUA>
> ifconfig <if> rtr_adv
```

e voilà! In current master both nodes would have needed to be compiled
with `GNRC_IPV6_NIB_CONF_MULTIHOP_P6C=0`.

[RFC6775]: https://tools.ietf.org/html/rfc6775#section-8.1.3
2018-02-15 14:40:33 +01:00
Daniel Krebs
cbc9121ad4 gnrc/netif: fix source address selection for non-matching prefixes
According to RFC 6724 ch. 5 rule 8, the source address candidate with
the longest matching prefix has to be selected. The current
implementation discards source addresses that have no matching prefix
(`match = 0`) which is perfectly fine for any global address.
2018-02-08 13:46:46 +01:00
smlng
c178ea8798 gnrc/netreg: remove gnrc_netreg_num 2018-02-06 21:41:19 +01:00
smlng
c2b403f4ad gnrc/netreg: remove usages of gnrc_netreg_num 2018-02-06 21:39:58 +01:00
smlng
573b6dc98a gnrc/netreg: optimize lookup and getnext 2018-02-06 21:37:39 +01:00
jia200x
c61c44a1ae
Merge pull request #8374 from Hyungsin/forupstream_radio_ackpending
driver/at86rf2xx: add an option for auto-ack with the pending bit
2018-02-06 14:15:40 +01:00
Martine Lenders
d4661af4c8 gnrc: 6Lo fixes for BLE 2018-02-05 22:34:31 +01:00
Martine Lenders
51ae9d9c87 nordic_softdevice_ble: fixes for gnrc_netif usage 2018-02-05 22:34:11 +01:00
ab1d02bc8c
Merge pull request #8499 from miri64/gnrc_icmpv6_echo/fix/loopback
gnrc_icmpv6_echo: fix ping for loopback
2018-02-05 11:02:57 +01:00
Sören Tempel
cfe0143eec gnrc_netif: Fix out-of-bounds buffer access in ieee802154 netif 2018-02-03 13:08:59 +01:00
aa52f5334b sys/net/gcoap: adapt to resource context ptr 2018-02-02 19:01:58 +01:00
0729259390 nanocoap: add context ptr to coap_resource_t 2018-02-02 18:54:29 +01:00
Hyungsin
f52efef0d5 netopt: Add NETOPT_ACK_PENDING 2018-01-31 11:58:48 -08:00
Martine Lenders
12fad002da gnrc_icmpv6_echo: fix ping for loopback
At the moment ping is crashing if one pings the loopback address.
This was caused in #8214 when we moved interfaces from `kernel_pid_t`
ID to pointer-based handling, since loopback doesn't evaluate to such
an interface.
2018-01-31 15:46:52 +01:00
Martine Lenders
c40a05b6a8 gnrc: fix link-layer/IPv6 address conversion for XBee 2018-01-31 10:54:28 +01:00
Martine Lenders
f1f079fb0e
Merge pull request #8480 from miri64/gnrc_ipv6_nib/fix/fix-conv
gnrc_ipv6_nib: ignore corner case when adding to PL
2018-01-30 13:52:15 +01:00
Martine Lenders
8e80a372cb gnrc_ipv6_nib: ignore corner case when adding to PL
In #8135 the handling of corner cases for the conversion of
milliseconds to seconds, but the internal handling was not adapted.
2018-01-30 12:28:50 +01:00
Sebastian Meiling
0abbd9db8f
Merge pull request #8439 from smlng/net/gnrc/netreg/fix_assert
gnrc/netreg: fix assert
2018-01-29 16:46:19 +01:00
Martine Lenders
763b887017 gnrc_ipv6_nib: release packages for forwarding error cases 2018-01-26 17:35:57 +01:00
Martine Lenders
70c1fb7b4e gnrc_ipv6_nib: fix final RA behavior
This fix

* assures that the periodicity of the final router advertisements is
  kept (so that no administrative change e.g. adding prefixes to the
  prefix list causes additional RAs outside the rate limitation)
* removes all administrative options (PIO, ABRO, 6CO) from final router
  advertisements (with router lifetime == 0)
2018-01-26 13:57:19 +01:00
smlng
321067b99f gnrc/netreg: remove unnecessary DEVELHELP condition 2018-01-25 17:01:10 +01:00
smlng
b3fde3429c gnrc/lwmac: ignore implicit fallthrough error by GCC 7 2018-01-24 22:07:01 +01:00
smlng
15f73e76ad gnrc/gomach: ignore implicit fallthrough error by GCC 7 2018-01-24 22:06:51 +01:00
Martine Lenders
d0140a9ec8
Merge pull request #8380 from miri64/gnrc_netif/enh/6lo-nrfmin
gnrc_netif: set-up 6Lo for NRFmin
2018-01-23 11:17:29 +01:00
Martine Lenders
6cabac3600 gnrc_ipv6_nib: add reverse-translation for NRFmin 2018-01-22 16:15:30 +01:00
Sebastian Meiling
3bb169307b
Merge pull request #8364 from smlng/osx/debug/fix_output
macOS: fix debug output
2018-01-22 15:14:48 +01:00
Martine Lenders
851eb767be gnrc_netif: set-up 6Lo for NRFmin 2018-01-18 13:00:25 +01:00
3f990480d1
Merge pull request #7162 from kb2ma/nanocoap/msgid_byte_order
nanocoap: fix byte order of request message ID, and add test application
2018-01-17 22:59:07 +01:00
d27fa8efa5
Merge pull request #8214 from miri64/gnrc_ipv6/enh/simplify-netif-access
gnrc_ipv6: gnrc_icmpv6: simplify access to network interfaces
2018-01-17 17:02:55 +01:00
Martine Lenders
7c0bb427fa gnrc_ipv6: gnrc_icmpv6: simplify access to network interfaces 2018-01-17 16:48:58 +01:00
smlng
65b99c994d gnrc/sixlowpan: fix format error in debug output 2018-01-17 15:25:15 +01:00
smlng
026bc281ae gnrc/netif: fix format error in debug output 2018-01-17 15:25:15 +01:00
Sebastian Meiling
50f3d6a427
Merge pull request #7337 from kb2ma/gcoap/confirm_piggy_client
net/gcoap: Confirmable request with piggybacked ACK response
2018-01-16 20:35:32 +01:00
Sebastian Meiling
0d1f40393f
Merge pull request #8362 from beduino-project/gcoap-check-for-ndebug
gcoap: check if NDEBUG is defined
2018-01-16 13:18:41 +01:00
Ken Bannister
4223de6b8b net/gcoap: automate retries for confirm timeout 2018-01-16 06:37:29 -05:00
Sören Tempel
89edc437d5 gcoap: remove the #ifdef DEVELHELP
To make sure the cf variable doesn't trigger an `unsed variable` warning
when compile with `-DNDEBUG`.
2018-01-16 11:06:28 +01:00
Ken Bannister
d5e4da74bf net/gcoap: improve validation of incoming message 2018-01-15 23:21:05 -05:00
Ken Bannister
4062b1f660 net/gcoap: populate confirm request attributes
Also, create resend_bufs array to store PDU for resend.
2018-01-15 23:21:05 -05:00
7b72f623d2 gnrc: netif2: DEBUG fixes 2018-01-15 14:37:05 +01:00
12d4254ae1 gnrc: nib: DEBUG fix 2018-01-15 14:37:05 +01:00
fd884c2d05 gnrc: rpl: DEBUG fix 2018-01-15 14:37:05 +01:00
af991deeb2 sys: net: gcoap: DEBUG fixes 2018-01-15 14:37:04 +01:00
56b8c55f1a gnrc: mac: DEBUG fix 2018-01-15 14:37:04 +01:00
35ea251516 gnrc: lwmac: DEBUG fix 2018-01-15 14:37:04 +01:00
8a74210b31 gnrc/netapi: DEBUG fix 2018-01-15 14:37:04 +01:00
4dba9ee6ba sys: net: adapt to compile-checked debug messages 2018-01-15 14:37:04 +01:00
Ken Bannister
c9b6e990f7 net/nanocoap: message ID received in host order 2018-01-12 05:58:52 -05:00
Martine Lenders
4013adcf65
Merge pull request #8277 from miri64/doc/fix/must-not-may-not-wording
doc: Fix 'must not'/'may not' wording
2018-01-10 20:34:17 +01:00
Martine Lenders
e888e47a0c
Merge pull request #8325 from miri64/gnrc_netif/enh/add-nrfmin-iid
gnrc_netif: add nrfmin IID support
2018-01-05 13:29:19 +01:00
Martine Lenders
c6833704dc gnrc_netif: add nrfmin IID support
Adds a `nrfmin` case to IID generation, so an IID can be generated
from a `nrfmin` device's (short) address (the long address is just
4-time repetition of the short address).
2018-01-05 13:06:35 +01:00
Martine Lenders
3a493436ba gnrc_netif: generalize IID generation for short addresses
Moves setting of addresses of length lesser than 3 to a function that
initializes the first 5 byte of the IID with `00:00:00:ff:fe` and then
fills up the rest with zeroes and the given short address.
2018-01-05 13:06:35 +01:00
Martine Lenders
cee9a9c173 gnrc_ipv6_nib: fix nrfmin module check
The module is called `nrfmin` not `netdev_nrfmin`. As such this compile
path was never included, even if the `nrfmin` module was present.
2018-01-05 10:40:25 +01:00
Sören Tempel
35fea645c1 gcoap: return Method Not Allowed if appropriate 2017-12-26 18:17:45 +01:00
Martine Lenders
ac99782d53
Merge pull request #8279 from zhuoshuguo/gnrc_gomach_add_allo_slot_limit
gnrc_gomach: add flexible number limit for allocating slots.
2017-12-19 12:33:02 +01:00
17ac0fa3a7
Merge pull request #8101 from miri64/gnrc_netif2/opt/flag-checkers
gnrc_netif: assume flag settings on compile time
2017-12-19 12:10:25 +01:00
Martine Lenders
7b5a42ba58
gnrc_netif: assume flag settings on compile time 2017-12-19 12:04:36 +01:00
zhuoshuguo
0c53762a1f gnrc_gomach: address comment. 2017-12-19 11:37:48 +01:00
smlng
800345b17e net: fix output in gnrc_pktdump for ccnl 2017-12-19 10:37:05 +01:00
zhuoshuguo
a98c3f0d31 gnrc_gomach: add number limit for allocated slots. 2017-12-19 10:18:51 +01:00
Martine Lenders
2e93ba1c50
doc: Fix 'must not'/'may not' wording
I applied the following terminology and changed the wording in the doc
accordingly:

* must not: If the parameter is of the value it *must not* be it either
  hits an assert or crashes the system.
* may not: The value can be that value, but the function will return an
  error.
2017-12-19 09:00:12 +01:00
Martine Lenders
8a058d32f9
gnrc_netif: pass up returned error of internal function
If there is no space left on the interface, a user should be notified
about that when using `gnrc_netapi_set()`
2017-12-18 17:01:17 +01:00
3a572d82cd
Merge pull request #8252 from miri64/gnrc_netif/api/rename-ipv6_addr
gnrc_netif: rename IPv6 address "setters"
2017-12-18 17:00:31 +01:00
Sebastian Meiling
c24e87e47d
Merge pull request #8250 from kb2ma/gcoap/remote_in_request
net/gcoap: Track remote endpoint for all requests
2017-12-18 13:17:27 +01:00
Ken Bannister
062bc15f00 net/gcoap: Track remote endpoint for all requests 2017-12-18 06:24:58 -05:00
5cf71e3096 sys/net/netopt: add NETOPT_CHANNEL_FREQUENCY option 2017-12-14 15:01:09 +01:00
PeterKietzmann
70810ae697 sys/netif: include release of iovec in gnrc_netif_raw 2017-12-13 17:29:10 +01:00
PeterKietzmann
6295e4a7c9 sys/netif: add missig pkt release in gnrc_netif_raw 2017-12-13 15:44:39 +01:00
Martine Lenders
2ae30cf582 gnrc_netif: rename IPv6 address "setters"
This renames the following functions

* `gnrc_netif_ipv6_addr_add()`
* `gnrc_netif_ipv6_addr_remove()`
* `gnrc_netif_ipv6_group_join()`
* `gnrc_netif_ipv6_group_leave()`

by appending the suffix `_internal`.

\## Reasoning

I'd like to provide a helper function for the *public* equivalent using
`gnrc_netapi_set()`, and those names are to nice to not be taken for
those.

\## Procedure
I used a combination of `git grep` and `sed` to do this and fixed the
alignment in the result of some cases by hand.

```sh
git grep --name-only "\<gnrc_netif_ipv6_\(addr\|group\)_\(add\|remove\|join\|leave\)\>" | \
        xargs sed -i 's/\<gnrc_netif_ipv6_\(addr\|group\)_\(add\|remove\|join\|leave\)/\0_internal/g'
```
2017-12-13 13:50:39 +01:00
zhuoshuguo
cebc995ec3 gnrc_gomach: add sender ID number limit in beacon packet. 2017-12-11 11:31:39 +01:00
400dccfaa1 sys/net/netopt: remove unused NETOPT_DEVICE_MODE 2017-12-09 20:06:57 +01:00
Martine Lenders
7745060ad9
Merge pull request #8209 from bergzand/pr/netifeth_oddebug
gnrc_netif: Fix compile errors when debug is enabled
2017-12-05 16:28:22 +01:00
039bdf2aa6
gnrc_netif: Fix debug printing in ieee802154 2017-12-05 14:49:48 +01:00
ef8222e4bd
gnrc_netif: Include od when debugging 2017-12-05 14:48:02 +01:00
Martine Lenders
5bdf3670e3
gnrc_ipv6: fix packet snip switch-up 2017-12-05 12:57:50 +01:00
3367840fa2 sys/net/nanocoap: use submodules 2017-12-01 12:55:45 +01:00
84bc849014 sys: net: nanocoap: ignore Uri-Host option 2017-12-01 12:55:45 +01:00
16bdbe5d32 sys: net: add nanocoap 2017-12-01 12:55:44 +01:00
Sebastian Meiling
73d9c460d3
Merge pull request #7336 from kb2ma/gcoap/confirm_infrastructure
net/gcoap: Create confirm request infrastructure and adapt existing messaging
2017-12-01 11:18:24 +01:00
0d85186653
Merge pull request #8180 from miri64/gnrc_netdev/cleanup/rm
gnrc_netdev: remove remaining files and references
2017-11-30 20:05:17 +01:00
Martine Lenders
5a0e9bcca4 gnrc_netdev: remove remaining files and references
Somehow, these files were forgotten in my big cleanup in #7925. This
fixes that.
2017-11-30 19:49:40 +01:00
zhuoshuguo
ea5aeeb10f gomach: a robust traffic adaptive multichannel MAC for IoT. 2017-11-30 18:51:49 +01:00
Cenk Gündoğan
06782c4721
Merge pull request #8173 from bergzand/pr/gnrc_uhcpc_rpl
gnrc_uhcpc: initialize rpl root on prefix configuration
2017-11-30 13:15:49 +01:00
2ba110d8f7
gnrc_uhcpc: initialize rpl root on prefix configuration 2017-11-30 13:08:55 +01:00
Sebastian Meiling
8f7de7c2fe
Merge pull request #8179 from miri64/gnrc_ipv6_nib/api/NULL-l2addr
gnrc_ipv6_nib: Allow l2addr == NULL for gnrc_ipv6_nib_nc_set()
2017-11-29 21:07:39 +01:00
zhuoshuguo
e6409f025f gnrc_lwmac: include lwmac headers when LWMAC defined. 2017-11-29 17:29:26 +01:00
Martine Lenders
7d20a80ba8
gnrc_ipv6_nib: Allow l2addr == NULL for gnrc_ipv6_nib_nc_set() 2017-11-29 17:26:45 +01:00
Peter Kietzmann
eb2c0e29ab
Merge pull request #8155 from RIOT-OS/revert-8009-revert-7238-pr_sc_ccnl_chunkdump
Revert "Revert "shell/ccnl: remove use of ccnl_wait_for chunk()""
2017-11-28 21:36:38 +01:00
smlng
b283b7784c make: fix various compile errors with Wextra
pkg, nordic_softdevice_ble: disable CFLAGS to omit compiler error
        sys, pm_layered: fix casting nonscalar to the same type
        cpu, stm32_common: fix type-limits, remove always true assert
        cpu, stm32f4: fix pointer arithmetic in periph/i2c
        drivers, at86rf2xx: fix type-limits where condition always true
        saul, gpio: fix if no gpio configured for saul
        cpu, saml21: add frequency check to periph/timer
        driver, cc110x: fix unused param and type-limts errors
        boards, wsn430-common: fix old-style-declaration
        make: fix old style definition
        drivers, sdcard_spi: fix old style typedef
        driver, at30tse: remove unnecessary check
        driver, nrf24: fix type-limit
        driver, pn532: change buffer from char to uint8_t
        tests/driver_sdcard: fix type limits
        boards, feather-m0: add missing field inits
        driver, tcs37727: fix type limits
        pkg, emb6: disable some compiler warnings
        tests/emb6: disable some compiler warings
        pkg, openthread: fix sign compare and unused params
        tests/trickle: fix struct init
        tests/pthread_cooperation: fix type limits
        board, mips-malta: remove feature periph_uart
        shell: fix var size for netif command
        gnrc, netif: fix sign-compare
        gnrc, nib: fix sign-compare
        shell: fix output in netif command
        posix: fix type-limits in pthread_cond
2017-11-28 18:31:43 +01:00
smlng
aa6e1711d4 net, lwmac: cleanup, restructured code 2017-11-28 17:28:40 +01:00
smlng
e381317fbf make: fix sign-compare errors
cpu, nrf5x_common: fix sign-compare in periph/flashpage
    drivers, periph_common: fix sign-compare in flashpage
    cpu, sam0_common: fix sign-compare error in periph/gpio
    cpu, cc2538: fix sign-compare in periph/timer
    cpu, sam3: fix sign-compare in periph/gpio
    cpu, stm32_common: fix sign-compare in periph/pwm
    cpu, stm32_common: fix sign-compare in periph/timer
    cpu, stm32_common: fix sign-compare in periph/flashpage
    cpu, nrf5x_common: fix sign-compare in radio/nrfmin
    cpu, samd21: fix sign-compare in periph/pwm
    cpu, ezr32wg: fix sign-compare in periph/gpio
    cpu, ezr32wg: fix sign-compare in periph/timer
    drivers, ethos: fix sign-compare
    sys, net: fix sign-compare
    cpu, atmega_common: fix sign-compare error
    cpu, msp430fxyz: fix sign-compare in periph/gpio
    boards, msb-430-common: fix sign-compare in board_init
    driver, cc2420: fix sign-compared
    sys/net: fix sign-compare in gnrc_tftp
    driver, pcd8544: fix sign-compare
    driver, pn532: fix sign-compare
    driver, sdcard_spi: fix sign-compare
    tests: fix sign_compare
    sys/net, lwmac: fix sign_compare
    pkg, lwip: fix sign-compare
    boards, waspmote: make CORECLOCK unsigned long to fix sign_compare error
    tests, sock_ip: fix sign compare
    tests, msg_avail: fix sign compare
    tests, sock_udp: fix sign compare
    boards: fix sign-compare for calliope and microbit matrix
2017-11-28 11:55:48 +01:00
Martine Lenders
e65211db7d
Merge pull request #7195 from miri64/gnrc_pktbuf_malloc/feat/initial
gnrc_pktbuf_malloc: initial import of a malloc()-based pktbuf
2017-11-28 00:00:36 +01:00
Martine Lenders
a63bb6d47b
Merge pull request #6895 from bergzand/drivers/radio-rssi-conv
drivers/radios Apply register to rssi dBm conversion to all radios
2017-11-27 23:52:15 +01:00
fa64e93313 netdev: Represent RSSI as int16_t 2017-11-27 21:49:15 +01:00
Martine Lenders
e8531383d2
Revert "Revert "shell/ccnl: remove use of ccnl_wait_for chunk()"" 2017-11-27 21:40:54 +01:00
Martine Lenders
6db9e15485
Merge pull request #7346 from smlng/net/gnrc_tcp/use_push
gnrc tcp: use push flag in send
2017-11-27 21:24:45 +01:00
8a6d04ce52
Merge pull request #7925 from RIOT-OS/gnrc_netif2_integration/master
gnrc_netif2: gnrc_ipv6_nib: full integration into GNRC
2017-11-27 21:12:14 +01:00
Martine Lenders
a32a2a93e1 gnrc_ipv6_nib: add interface parameter to nc_del function 2017-11-27 20:32:27 +01:00
Martine Lenders
2f8223106b
gnrc_ipv6_nib: fix ms to sec conversion for sending NDP PIOs 2017-11-24 13:52:20 +01:00
Martine Lenders
973007ad38
gnrc_ipv6_nib: fix ltime > MAX / 1000 corner case in NDP PIOs as well 2017-11-24 13:52:19 +01:00
Martine Lenders
63cc5f6751
gnrc_rpl: fix corner cases in sec/ms conversion in prefix lifetimes
Two edge cases were previously missed:

1. Infinite should stay infinite. Prefixes with infinite lifetimes
   should be advertised as such. Likewise, should prefixes with
   infinite lifetimes be added to the prefix list as such
2. Prefixes with lifetimes > (UINT32_MAX - 1) / 1000 should have the
   longest possible lifetime below infinite (UINT32_MAX - 1)

This fixes that.
2017-11-24 13:45:26 +01:00
aff7d6ecd8
Merge pull request #8097 from miri64/gnrc_ipv6_nib/fix/reduce-unreachable-backoff
gnrc_ipv6_nib: reduce backoff if neighbor UNREACHABLE and trying reach to it
2017-11-24 01:05:55 +01:00
Martine Lenders
97b0db61ca gnrc_rpl: remove redundant iface variable 2017-11-24 00:20:32 +01:00
Martine Lenders
423fc74bd2 gnrc_rpl: fix check if DODAG-ID is on interface 2017-11-24 00:20:32 +01:00
Martine Lenders
279e19fe8a gnrc_rpl: properly handle prefix list 2017-11-23 22:56:55 +01:00
3979ffcf1b gnrc_rpl: Exclude routes without next hop from DAO packets 2017-11-23 19:29:07 +01:00
Martine Lenders
ec02458c55
gnrc_rpl: fix abandoned packet bug in transit option build
Due to the transit option build function being passed a NULL pointer,
the previous transit and target options are dropped (and never freed).

This fixes #8098 and #8126.
2017-11-23 18:43:36 +01:00
Martine Lenders
4476d340f0
gnrc_ipv6_nib: remove trailing semicolon in ARSM macro 2017-11-21 17:21:34 +01:00
Martine Lenders
5b747e2629
gnrc_ipv6_nib: cap-off NS sent to prefent overflows 2017-11-21 17:21:34 +01:00
Martine Lenders
168228ddc9
gnrc_ipv6_nib: do not try to re-register to an unreachable router 2017-11-21 17:21:33 +01:00
Martine Lenders
61b539abf9
gnrc_ipv6_nib: reduce backoff if neighbor UNREACHABLE and trying to it
When a neighbor becomes UNREACHABLE which causes neighbor solicitations
to be send only up to every minute. If the medium is very busy this can
easily get lost, basically causing the neighbor never to be reachable
again from the perspective of the sending node. To fix this the backoff
is reduced to its start value, every time a packet is sent to that
neighbor.
2017-11-21 11:38:45 +01:00
b561e84b7f
Merge pull request #8091 from miri64/gnrc_ipv6_nib/fix/rereg-retrans-unit
gnrc_ipv6_nib: fix retransmission timeout unit for address re-registration
2017-11-20 15:42:59 +01:00
e5cf4a5396
Merge pull request #8089 from miri64/gnrc_netif/fix/add-sol-nodes
gnrc_netif: join/leave solicited nodes IPv6 address add/remove
2017-11-20 14:35:49 +01:00
Martine Lenders
564d3c7581
gnrc_ipv6_nib: remove now duplicate join to sol. nodes 2017-11-20 14:22:55 +01:00
Martine Lenders
d4e60dae2e
gnrc_netif: join/leave solicited nodes IPv6 address add/remove 2017-11-20 14:22:55 +01:00
Martine Lenders
10b74740eb
gnrc_netif: fix GNRC_NETAPI_GET of arrays
The target array currently moves with the loop instead of with the
results. This fixes that.
2017-11-20 14:18:09 +01:00
Martine Lenders
8c4eb43701
gnrc_ipv6_nib: fix retrans. timeout unit for address re-registration 2017-11-20 13:52:37 +01:00
Martine Lenders
12261a3e69 gnrc_ipv6_nib: Remove stray assert() in _handle_aro()
This assertion doesn't make any sense. The function is called by
_copy_and_handle_aro() on a router which causes `nce` to be NULL
(because there is no NCE known yet) and then the function called
directly after (_reg_addr_upstream()) checks if `nce` might be NULL and
creates an NCE if necessary.
2017-11-20 06:41:08 +01:00
Cenk Gündoğan
de5e0c677f gnrc_netif: fix DEBUG output 2017-11-20 00:35:17 +01:00
Cenk Gündoğan
3be5c9fdf3 nib: use correct fall through hint 2017-11-20 00:35:17 +01:00
Cenk Gündoğan
5b5c479043 rpl: replace fib with nib 2017-11-20 00:35:17 +01:00
Martine Lenders
2a899c45ac gnrc_ipv6_nib: make user added default route the primary one 2017-11-19 23:36:20 +01:00
Martine Lenders
e7bb0ed67f
gnrc_uhcpc: adapt for route lifetime 2017-11-17 13:44:18 +01:00
Martine Lenders
f62974207d
gnrc_ipv6_nib: add timeouts to routes 2017-11-17 13:43:18 +01:00
Martine Lenders
fb5851dde4
gnrc_ipv6_nib: actually timeout a default router
While the GNRC_IPV6_NIB_RTR_TIMEOUT is properly handled, it is actually
never fired. Moreover, the router lifetime is set, but never read.

This removes the router lifetime and switches it out for an evtimer
to does the GNRC_IPV6_NIB_RTR_TIMEOUT event.
2017-11-17 11:43:32 +01:00
Martine Lenders
f90a9a875f
gnrc_ndp2: rename to gnrc_ndp 2017-11-17 10:41:54 +01:00
Martine Lenders
31b1ceb440
gnrc_netif2: rename to gnrc_netif 2017-11-17 10:41:54 +01:00
Martine Lenders
636ef2a498
gnrc: remove legacy neighbor discovery code 2017-11-17 09:20:30 +01:00
Martine Lenders
71a7dbf918
gnrc: remove legacy network interface structures 2017-11-17 09:20:29 +01:00
Martine Lenders
bf8465c650
Merge pull request #7479 from miri64/gnrc_ipv6_nib/feat/ndp-rd
gnrc_ipv6_nib: implement behavior for router discovery
2017-11-16 16:35:21 +01:00
Martine Lenders
ccb8462d94
gnrc_sixlowpan_nd: adapt for NIB 2017-11-16 15:49:21 +01:00
Martine Lenders
319c0f9d21
gnrc_ipv6_nib: implement behavior for router discovery 2017-11-16 15:49:20 +01:00