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

2551 Commits

Author SHA1 Message Date
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
Sebastian Meiling
513e3eca2f
Merge pull request #9522 from miri64/gnrc_ipv6_nib/enh/slaac-fallback
gnrc_ipv6_nib: fallback to SLAAC if ARO is ignored by upstream
2018-08-10 08:21:31 +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
Ken Bannister
3f3df74bcd
Merge pull request #7237 from Ell-i/feature-gcoap-extra-indirection
net/gcoap: Make references to coap_resource_t all const in gcoap
2018-08-07 23:52:59 -04: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
smlng
7cb41ba829 gnrc_netif: cleanup debug output
Correct typos and wording in debug output.
2018-08-06 16:28:48 +02:00
smlng
8e3953cd6c gnrc_netif: cleanup address matching
Cleanup of internal helper functions for IPv6 address matching.
2018-08-06 16:28:48 +02:00
smlng
fd718dfc74 gnrc_udp: assert ports not zero
UDP port 0 is reserved for system usage, e.g., to tell the OS to
    set a random source port. Hence, neither source nor destination
    port should be 0 when transmitting. This PR adds proper asserts.
2018-08-06 16:09:22 +02:00
Martine Lenders
9720cd857d gnrc_ipv6_nib: include SLAAC debug addr_str into #ifdef 2018-08-06 14:51:34 +02:00
Martine Lenders
bdb1e80e0a gnrc_ipv6_nib: make RS emission configurable 2018-08-06 14:51:18 +02:00
Martine Lenders
f946314837 gnrc_ipv6: refactor to remove superfluous temporary variable
Since no release in this function is required anyways, we can just use
`payload` to check the return value directly.
2018-08-02 15:20:59 +02:00
Martine Lenders
cb4f6a96a8 gnrc_ipv6: correctly reset from temporary variable
While `tmp` in the loop for write-protection for the check-sum
calculation is used to check the return value of
`gnrc_pktbuf_start_write()`, it was never overwriting `payload` causing
the original snip to be used in the following iteration `prev` when
duplicated, and destroying the sanity of `ipv6`.
2018-08-02 15:17:40 +02:00
Martine Lenders
72e9b1f623 gnrc_ipv6: remove superfluous release
The packet handed to `_fill_ipv6_hdr()` is already released in the
caller (in the current version this is only `_save_fill_ipv6_hdr()`).
2018-08-02 15:16:08 +02:00
Pekka Nikander
8f10d65ad5 net/gcoap: Make references to coap_resource_t const in gcoap
A CoAP resource is a primary object between the application
    and CoAP library.  The Library needs the paths, methods,
    and handlers from it, so that it can call the right handler.
    However, it never needs to change any of them.

    The application also needs the resources.  The application
    may want to declare the resources as const, since it may
    want to store them in flash.
2018-07-30 09:00:21 +03:00
Martine Lenders
69d9ecc0d9 gnrc_sixlowpan_iphc: refactor reception for #8511
This refactors reception/decoding part of `gnrc_sixlowpan_iphc` to the
more layered approach modeled in #8511. Since the reception part is
already complicated enough I decided to divide send and receive up into
separate changes.
2018-07-25 18:15:09 +02:00
Cenk Gündoğan
7fef5e030a
Merge pull request #9485 from miri64/gnrc_sixlowpan_iphc/enh/i8511-send
gnrc_sixlowpan_iphc: refactor sending for #8511
2018-07-25 17:57:59 +02:00
Martine Lenders
80322cbd7d gnrc_sixlowpan_iphc: refactor sending for #8511
This refactors sending/encoding part of `gnrc_sixlowpan_iphc` to the
more layered approach modeled in #8511. Since the reception part is
already was pretty complicated to refactor, I decided to divide send
and receive up into separate changes.
2018-07-25 17:35:59 +02:00
Martine Lenders
d6b2a9ed01
Merge pull request #9483 from miri64/gnrc_sixlowpan_frag/enh/finish-frag
gnrc_sixlowpan_frag: Expose functions to finish datagram
2018-07-25 11:53:14 +02:00
Martine Lenders
64fed621d2 gnrc_sixlowpan_frag: Expose functions to finish datagram
This will be used in the IPHC refactoring to control the reassembly
buffer as a context.

I also adapted the name of `gnrc_sixlowpan_frag_gc_rbuf()` to be in
line with the rest of the newer functions.
2018-07-25 11:26:02 +02:00
Cenk Gündoğan
0dc02d9a97
Merge pull request #9482 from miri64/gnrc_sixlowpan_frag/enh/pages
gnrc_sixlowpan_frag: add page context to reassembly buffer
2018-07-24 18:16:39 +02:00
Cenk Gündoğan
e189d96171
Merge pull request #9585 from miri64/sixlowpan/fix/print
sixlowpan: various fixes to sixlowpan_print() function
2018-07-24 14:00:13 +02:00
Peter Kietzmann
1b7e164662
Merge pull request #9606 from bergzand/pr/netif/conf_events_on_reset
gnrc_netif: reapply event flags on device reset
2018-07-24 08:43:52 +02:00
Martine Lenders
dc8c983d26
Merge pull request #9341 from bergzand/pr/sockutil/cleanup
sock_util: Add unittest and fix detected issues.
2018-07-20 12:09:31 +02:00
0c43dc743d
sock_util: Limit recursion in str2ep 2018-07-20 11:48:29 +02:00
b024ff1cb8
sock_util: Add checks to port number parsing
Add additional checks to the port number parsing in str2ep to validate
the port number supplied in the string. This only verifies that the port
number is no longer than 5 chars and the resulting number fits in a
uint16_t.

It is still possible to supply up to 5 random chars.
2018-07-19 22:07:19 +02:00
bff8694051
sock_util: check path length in urlsplit
Add a length check to the path to ensure that it fits in the supplied
buffer in the urlsplit function
2018-07-19 22:07:19 +02:00
d93ecab880
sock_util: Add terminator to host-port string
Add missing null terminator to the returned host-port string in
sock_udp_ep_fmt
2018-07-19 22:07:18 +02:00
b8a494fb76
sock_util: Prevent overflow in sock_urlsplit
This adds a length check to verify if the host-port part of the URL fits
in the supplied buffer
2018-07-19 22:07:18 +02:00
3096823ab4
sock_util: Allow URLs without path as valid
URLs without a path were treated as invalid, while according to the URL
specification they are valid

Also fixes a missing null terminator in the returned path
2018-07-19 22:07:18 +02:00
3402e3509c
sock_util: Prevent overflow in _find_pathstart
Limit the number of scanned chars in _find_pathstart to the predefined
size
2018-07-19 22:07:18 +02:00
b0309145f0
sock_util: Limit URL scheme size 2018-07-19 22:07:17 +02:00
Martine Lenders
3870def74c gnrc: mac: fix types according to print formatting
As reported by `llvm`.
2018-07-19 15:13:39 +02:00
30e683ccfe
gnrc_netif: reapply event flags on device reset
On a NETOPT_STATE set call with NETOPT_STATE_RESET the netdev device
resets the callback event flags. This requires that after the netdev
device resets, the network stack also reapplies these callback event
flags
2018-07-19 14:51:14 +02:00
4c183257df
sock_util: Fix null terminator in sock_udp_ep_fmt 2018-07-18 17:44:03 +02:00
6a81a4d587
sock_util: add missing includes 2018-07-18 17:43:59 +02:00
Martine Lenders
c6d46057b0 sixlowpan: use generic format strings instead of inttypes.h macros
We had bad experiences with those in the past when used with newlib-nano
;-)
2018-07-17 12:22:16 +02:00
Martine Lenders
ecfff3e812 sixlowpan: fix decoding of DAM in sixlowpan_print()
Destination address compression is all in the least significant nibble
of that byte in the IPHC header [[1]].

[1]: https://tools.ietf.org/html/rfc6282#section-3.1.1
2018-07-17 12:22:15 +02:00
Martine Lenders
d8081453f2 gnrc_ipv6: clean-up and simplify send handling
This change is a gnrc_ipv6_nib/gnrc_netif(2)-based rework of #7210.

Packet duplication
==================

Its main optimization is that it restructures `gnrc_ipv6` handling of
sent packets so that duplication for write-protection happens at the
latest possible step:

* potential `gnrc_netif` headers added by upper layers are
  write-protected before their removal
* This unifies the duplication of the IPv6 header directly after
  that
* Extension headers in-between the IPv6 header and the payload header
  are duplicated just before the check sum is duplicated

Especially the last point allows for only handing a single packet snip
to all lower functions instead of an already searched IPv6 header
(which now is always the first until it is handed to the interface) +
payload header.

Further clean-ups
=================
* Next-hop link-layer address determination was moved to the
  `_send_unicast` function, greatly simplifying the unicast case in the
  `_send` function
* Code for loopback case was added to a new function `_send_to_self`
* Removed some code duplication
2018-07-16 15:08:56 +02:00
Peter Kietzmann
9f34513eec
Merge pull request #9563 from bergzand/pr/netif/netdev_recv_reset
gnrc_netif_ieee802154: drop frame on buffer error
2018-07-13 16:21:33 +02:00
ea6a2ef494
gnrc_netif_ieee802154: drop frame on buffer error
This adds a netdev recv call to indicate that the received frame should be
dropped when there is no buffer space available to store the frame.
2018-07-12 16:15:00 +02:00
Martine Lenders
3b1e4f54d2
Merge pull request #9532 from brummer-simon/gnrc_tcp-fix_includes
gnrc_tcp: Add missing includes
2018-07-10 20:22:13 +02:00
Simon Brummer
3b89bef366 gnrc_tcp: Add missing includes 2018-07-10 16:00:36 +02:00
Martine Lenders
8d47210228 gnrc_netif: don't spam user if dev doesn't support NETOPT_RX/TX_END_IRQ 2018-07-09 17:23:31 +02:00
Peter Kietzmann
15b0fe4368
Merge pull request #9467 from gebart/pr/gnrc_netif-netdev-flags
gnrc_netif: Enable RX and TX complete events after netdev init
2018-07-09 08:59:32 +02:00