Commit Graph

1373 Commits

Author SHA1 Message Date
Hubert Miś 5e43418cf9 net: coap: acknowledgement initialization helper
When handling CoAP Confirmable requests, there is a common
Acknowledgement initialization procedure that repeats for each
response packet initialization. This patch adds a function that
simplifies Acknowledgement initialization procedure encapsulating
repeating code.

Signed-off-by: Hubert Miś <hubert.mis@nordicsemi.no>
2021-02-15 10:17:11 +02:00
Hubert Miś 9831ddd14b net: ipv6: add function checking if given address is ULA
This patch adds a helper function to verify if given IPv6 address is
a unique local address.

Signed-off-by: Hubert Miś <hubert.mis@nordicsemi.no>
2021-02-15 10:15:18 +02:00
Marcin Niestroj 1bad79ceeb net: offload: fix device and driver names generated by DT device macros
Generated device and driver names have changed with commits [1] and [2],
but net offload drivers missed the conversion. Update net offload DT
device macros now.

[1] commit 8c1bef535b ("device: support generating defines from
  devicetree nodes with no label")
[2] commit f91e9fba51 ("device: fix potential truncation of DT-derived
  device names")

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2021-02-14 18:45:04 -05:00
Anas Nashif 5d1c535fc8 license: add missing SPDX headers
Add SPDX header to files with existing license.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-02-11 08:05:16 -05:00
Hubert Miś 22687c34e3 net: coap: define default CoAP version
RFC 7252 (CoAP) specifies value of the Version (Ver) field in the
protocol header to value 1. This patch defines value of the Version
field to make packet initialization easier. All samples and tests
are updated to use the new COAP_VERSION_1 field when initializing
a CoAP packet.

Signed-off-by: Hubert Miś <hubert.mis@nordicsemi.no>
2021-02-02 14:03:01 -05:00
Hubert Miś 0475cd0eae net: coap: Allow encoding packets using data from constant buffers
Token and payload are appended from data buffers to a CoAP packet
being encoded. Keyword const was missing for parameters in functions
appending these parts to a packet.

Now token and paylod can be copied to CoAP packet from constant
buffers, that can be stored in ROM.

Signed-off-by: Hubert Miś <hubert.mis@nordicsemi.no>
2021-01-26 06:17:41 -05:00
Hubert Miś 759f7454d8 net: coap: define max token length
This patch introduces COAP_TOKEN_MAX_LEN definition in coap.h file.
This definition replaces magic number across CoAP protocol
implementation and CoAP samples.

Signed-off-by: Hubert Miś <hubert.mis@nordicsemi.no>
2021-01-26 06:17:41 -05:00
Peter Bigot f91e9fba51 device: fix potential truncation of DT-derived device names
While using the encoded path to a device tree node guarantees a unique
identifier for the corresponding device there is a limit on the number
of characters of that name that can be captured when looking up a
device by name from user mode, and the path can exceed that limit.

Synthesize a unique name from the node dependency ordinal instead, and
update the gen_defines script to record the name associated with the
full path in the extern declaration.

Add a build-time check that no device is created with a name that
violates the user mode requirement.

Also update the network device DTS helper functions to use the same
inference for dev_name and label that the real one does, since they
bypass the real one.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-01-25 16:26:12 -05:00
Luiz Augusto von Dentz d8a41c8179 net: buf: Allow passing NULL as allocator to net_buf_append_bytes
This enables to use net_buf_append_bytes without passing an allocator in
which case the code would attempt to use the net_buf_pool of the
original buffer.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2021-01-22 16:30:19 +02:00
Pablo Garrido c5955f3c83 net: include: Add missing brace to socket_select.h
Starting brace was missing in the socket_select.h file so adding
it back

#ifdef __cplusplus	
extern "C" {	
#endif

Fixes #31444

Signed-off-by: Pablo Garrido <pablogs9@gmail.com>
2021-01-20 12:01:27 +02:00
Lukasz Majewski ca5e3ea654 eth: Add support for Distributed Switch Architecture [DSA] switches
This patch add support for DSA switches to Zephyr.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
2021-01-20 10:03:42 +02:00
Hubert Miś 2dd611c9d0 net: socket: Implement SO_RCVTIMEO timeout option
This patch adds SO_RCVTIMEO option used to time out socket receiving
operations.

Signed-off-by: Hubert Miś <hubert.mis@nordicsemi.no>
2021-01-19 17:11:25 -05:00
Hubert Miś 13aa4b2f9e net: coap: define Content-Format option values
CoAP protocol defines registry of Content-Format option values.
This patch adds this enumeration to coap header file to make it
available to all applications using CoAP protocol. It modifies
code using CoAP service to use new enumeration.

Signed-off-by: Hubert Miś <hubert.mis@nordicsemi.no>
2021-01-19 16:07:20 -05:00
Robert Lubos c563736bd3 net: coap: Randomize initial ACK timeout
Add Kconfig option to randomize the initial ACK timeout, as specified in
RFC 7252. The option is enabled by default.

Additionally, finetune the default value of COAP_INIT_ACK_TIMEOUT_MS
option, to match the default ACK_TIMEOUT value specified by the RFC
7252. The RFC does not specify the minimum/maximum value of the
ACK_TIMEOUT parameter, but only suggests it should be no lower than 1
second, so adjust the option range to reflect this.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-01-18 23:22:37 -05:00
Robert Lubos 538e19ee2e net: coap: Rework pending retransmission logic
Introduce retransmission counter to the coap_pending structure. This
allows to simplify the retransmission logic and allows to keep track of
the number of remaining retranmissions.

Additionally, extend the `coap_pending_init()` function with `retries`
parameter, which allows to set the retransmission count individually for
each confirmable transaction.

Fixes #28117

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2021-01-18 23:22:37 -05:00
Andy Ross e956639dd6 kernel: Remove CONFIG_LEGACY_TIMEOUT_API
This was a fallback for an API change several versions ago.  It's time
for it to go.

Fixes: #30893

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2021-01-14 21:33:16 -05:00
Peter Bigot acd43cbaac net: timeout: refactor to fix multiple problems
The net_timeout structure is documented to exist because of behavior
that is no longer true, i.e. that `k_delayed_work_submit()` supports
only delays up to INT32_MAX milliseconds.  Nonetheless, use of 32-bit
timestamps within the work handlers mean the restriction is still
present.

This infrastructure is currently used for two timers with long
durations:
* address for IPv6 addresses
* prefix for IPv6 prefixes

The handling of rollover was subtly different between these: address
wraps reset the start time while prefix wraps did not.

The calculation of remaining time in ipv6_nbr was incorrect when the
original requested time in seconds was a multiple of
NET_TIMEOUT_MAX_VALUE: the remainder value would be zero while the
wrap counter was positive, causing the calculation to indicate no time
remained.

The maximum value was set to allow a 100 ms latency between elapse of
the deadline and assessment of a given timer, but detection of
rollover assumed that the captured time in the work handler was
precisely the expected deadline, which is unlikely to be true.  Use of
the shared system work queue also risks observed latency exceeding 100
ms.  These calculations could produce delays to next event that
exceeded the maximum delay, which introduced special cases.

Refactor so all operations that use this structure are encapsulated
into API that is documented and has a full-coverage unit test.  Switch
to the standard mechanism of detecting completed deadlines by
calculating the signed difference between the deadline and the current
time, which eliminates some special cases.

Uniformly rely on the scanning the set of timers to determine the next
deadline, rather than assuming that the most recent update is always
next.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-01-07 11:14:38 +02:00
Jordan Yates 9f95d8d029 net: buf: convert `#define` to `static inline`
Swap the `net_buf_*` -> `net_buf_simple_*` conversion `#define`s to
`static inline` functions. This is to provide better type checking on
the use of these functions.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2021-01-07 10:40:48 +02:00
Jordan Yates 7be105b86a net: buf: `net_buf_remove_*` API
Adds a new family of `struct net_buf` operations that remove data from
the end of the buffer.

The semantics of `net_buf_remove_mem` have been chosen to match those of
`net_buf_pull_mem`, i.e. the return value is a pointer to the memory
that was removed.

The opposite of this function, `net_buf_remove`, would need to return
the old end of the data buffer to be useful. However this value is
always an invalid target for reading or writing data to (It points to
the middle of unused data).The existance of the function would be
misleading, therefore it is not implemented.

Fixes #31069.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2021-01-05 14:31:13 +02:00
Jordan Yates a5cd0c0c51 net: buf: `net_buf_push_mem` function
Add function that copies in new data to the start of a `struct net_buf`.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2021-01-05 14:31:13 +02:00
Jordan Yates d0a56690a4 net: buf: document fragment limitations
Document limitations on the FIFO queuing functions when fragments are
used. Namely that the `get` functions are not thread-safe when fragments
are present.

This is due to multiple independent calls to `k_fifo_get/sys_slist_get`.
A second thread can interrupt the retrieval before all fragments have
been removed. The second thread can then read from the FIFO, obtaining
the trailing fragments as a 'new' `net_buf`. The first thread will then
either assert or pull in the next `net_buf` on the queue as part of the
first `net_buf`.

Fixes #28355

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2021-01-04 14:14:04 +02:00
Fabio Utzig 8713da70a3 doc: fix @param usage in callbacks
The proper usage of @param in callbacks is currently unsupported by
Doxygen so not warnings are generated. The issues fixed with this commit
where found while adding support to Doxygen for validating @param in
callbacks like it currently does for functions.

Signed-off-by: Fabio Utzig <fabio.utzig@nordicsemi.no>
2020-12-18 12:18:28 +01:00
Kumar Gala 7bd5607c33 net: ethernet: Introduce devicetree aware DEVICE define macros
Provide versions of ETH_NET_DEVICE_INIT that are both devicetree
node and instance aware. We use the _DEFINE suffix for the DT
versions to match the naming convention in device.h

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-12-17 11:02:11 -06:00
Kumar Gala ecba5aaa95 net: Introduce devicetree aware DEVICE define macros
Provide versions of NET_DEVICE_INIT, NET_DEVICE_INIT_INSTANCE, and
NET_DEVICE_OFFLOAD_INIT that are both devicetree node and instance
aware.  We use the _DEFINE suffix for the DT versions to match the
naming convention in device.h

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-12-17 11:02:11 -06:00
Maik Vermeulen 4cfd2a1943 net: lwm2m: Added execute arguments support
A dedicated LwM2M execute callback type has been implemented which
supports execute arguments. The lwm2m engine, lwm2m_client sample and
lwm2m objects have been updated accordingly. Also the API change has
been documented, and the lwm2m engine reference has been updated.

Fixes #30551.

Signed-off-by: Maik Vermeulen <maik.vermeulen@innotractor.com>
2020-12-13 15:39:08 -05:00
Simen S. Røstad adb8087707 net: mqtt: Return -1 if keepalive messages are disabled.
In mqtt_keepalive_time_left(), return -1 if keep alive messages are
disabled by setting CONFIG_MQTT_KEEPALIVE=0.

This allows to use mqtt_keepalive_time_left() directly as an input
for poll(). If no keep-alive is expected, -1 would indicate
that poll() can block until new data is available on the socket.

Signed-off-by: Simen S. Røstad <simen.rostad@nordicsemi.no>
2020-12-08 14:08:36 -05:00
Andy Ross fcd392f6ce kernel: subsys: lib: drivers: Use k_heap instead of z_mem_pool wrappers
Use the core k_heap API pervasively within our tree instead of the
z_mem_pool wrapper that provided compatibility with the older mempool
implementation.

Almost all of this is straightforward swapping of one alloc/free call
for another.  In a few cases where code was holding onto an old-style
"mem_block" a local compatibility struct with a single field has been
swapped in to keep the invasiveness of the changes down.

Note that not all the relevant changes in this patch have in-tree test
coverage, though I validated that it all builds.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2020-12-07 21:50:14 -05:00
Andy Ross 6965cf526d kernel: Deprecate k_mem_pool APIs
Mark all k_mem_pool APIs deprecated for future code.  Remaining
internal usage now uses equivalent "z_mem_pool" symbols instead.

Fixes #24358

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2020-12-07 21:50:14 -05:00
Robert Lubos 4331c05f17 net: lwm2m: Allow to acknowledge request early from the callback
LwM2M engine by default sends piggybacked responses for requests after
all callbacks are executed. This approach however isn't good enough if
the application callback executes some lenghty operations (for instance
during FW update). Delaying the ACK may result in unnecessary
retransmissions.

This commits adds an API function which allows to send an early empty
ACK from the application callback. This prevents further retransmissions
from the server side. After all callbacks are executed, the LwM2M engine
will send the response as a separate CON message.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-12-03 13:53:33 -05:00
Kamil Kasperczyk 414ba6b074 include: net: Fix incorrect casting of timeval on zsock_timeval.
Currently zsock_timeval implementation uses long type for both
tv_sec and tv_usec fields. In the select method timeval type is
directly casted on zsock_timeval, but in some cases (e.g. when
using CONFIG_POSIX_API and some specific libc version) both types
have fields of different sizes, what may lead to assigning them
incorrect values.
Using types declared by the used libc in the CONFIG_POSIX_API=y
case will let to keep timeval and zsock_timeval types compatible.

Signed-off-by: Kamil Kasperczyk <kamil.kasperczyk@nordicsemi.no>
2020-11-19 15:08:33 +02:00
Marcin Niestroj aac0f98d1d net: hostname: define public macro representing maximum hostname length
Add a macro in public header that represents maximum hostname string
length without terminating NULL character. This will allow other
modules, such as offloaded network drivers, to know how much space is
needed to allocate in order to fit whole hostname.

Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
2020-11-17 19:21:43 -05:00
Martin Åberg a6093804a9 net: ip: enforce alignment in struct cmsghdr
The alignment is needed when using CMSG_DATA() to access a uint64_t
when an object of type struct cmsghdr is allocated on the stack.

Also update the ALIGN_H and ALIGN_D macros to better match the
description in RFC 3542:
   "The macros ALIGN_H() and ALIGN_D(), which are implementation
   dependent, round their arguments up to the next even multiple of
   whatever alignment is required for the start of the cmsghdr structure
   and the data, respectively."

This commit makes the following test pass on qemu_leon3:
- net.socket.udp. It previously generated an unaligned data access
exception when a uint64_t value was accessed via CMSG_DATA().

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2020-11-17 11:44:16 +02:00
Martin Åberg b9d0414292 net: use UNALIGNED_PUT() to access IP address
This commit allows the net_ipv6_addr_create_iid() argument addr to
have relaxed alignment.

This commit makes the following tests pass on qemu_leon3:
- net.6lo

Details:

sparc-zephyr-elf-gcc 9.2.0 compiles the beginning of
net_ipv6_addr_create_iid(),

  addr->s6_addr[0] = 0xfe;
  addr->s6_addr[1] = 0x8e;
  UNALIGNED_PUT(0, &addr->s6_addr16[1]);
  UNALIGNED_PUT(0, &addr->s6_addr32[1]);

into

  400089d4 <net_ipv6_addr_create_iid>:
  400089d4:       9d e3 bf a0     save  %sp, -96, %sp
  400089d8:       03 3f a0 00     sethi  %hi(0xfe800000), %g1
  400089dc:       c0 2e 20 04     clrb  [ %i0 + 4 ]
  400089e0:       c2 26 00 00     st  %g1, [ %i0 ]
  400089e4:       c0 2e 20 05     clrb  [ %i0 + 5 ]
  400089e8:       c0 2e 20 06     clrb  [ %i0 + 6 ]
  400089ec:       c0 2e 20 07     clrb  [ %i0 + 7 ]

%i0 is the function argument "addr". %g1 is prepared with the value
0xfe800000. The "clrb" instruction sets a single byte in memory to
0 and has no alignment restriction.

We get an unaligned exception on PC 400089e0 when %i0 ("addr") is
not a multiple of 4. The instruction "st" stores the full 32-bit
register %g1 to memory address in %i0. The effective address (%i0)
of the 32-bit register store is required to be naturally aligned by
the architecture.

The compiler assumes that "addr" is aligned according to its type
and has knowledge about the data representation.

Signed-off-by: Martin Åberg <martin.aberg@gaisler.com>
2020-11-17 11:44:16 +02:00
Benjamin Lindqvist 1578e70eaf net: lwm2m: Add path generation macro
Currently, the Zephyr LwM2M code base is littered with hard-coded
object- and resource IDs, such as

    /* Mark 1st instance of security object as a bootstrap server */
    lwm2m_engine_set_u8("0/0/1", 1);

The purpose of this LoC is extremely opaque without the accompanying
comment. Each use of a resource path requires constantly checking
headers or the object registry to ensure you're not misremembering IDs.

To alleviate this, this commit introduces a variadic LwM2M path
expansion macro which performs preprocessor stringification on each
argument. For instance, "0/0/1" can now be written as

    LWM2M_PATH(LWM2M_OBJECT_SECURITY_ID, 0, SECURITY_BOOTSTRAP_FLAG_ID)

which, while albeit lengthier, avoids the use of hard-coded string
literals, thus making the code much more immediately understandable.

Signed-off-by: Benjamin Lindqvist <benjamin.lindqvist@endian.se>
2020-11-10 14:10:44 +02:00
Christopher Friedt e7e58439e7 net: dns: dns-sd: support dns service discovery
This change adds support for DNS Service Discovery (DNS-SD)
as described in RFC 6763.

Fixes #29099

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2020-11-09 16:15:02 -08:00
Christopher Friedt 5c691491a7 net: context: add net_context api to check if a port is bound
This change adds net_context_port_in_use(), which is a simple
wrapper around net_context_check_port() and is used to check
if a particular socket is bound to a given IP address.

Fixes #29649

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2020-11-09 16:15:02 -08:00
Christopher Friedt ec0e737b0c drivers: ieee802154: cc13xx_cc26xx: sub-ghz support
This change adds IEEE 802.15.4g (Sub GHz) support for the
cc1352r.

The 2.4 GHz radio and the Sub GHz radio are capable of
operating simultaneously.

Fixes #26315

Signed-off-by: Christopher Friedt <chrisfriedt@gmail.com>
2020-11-09 10:25:24 +02:00
Jukka Rissanen ab8fd8270a net: stats: Separate dropped TCP data segments and TCP packets
Track the number of dropped TCP data segments and number of dropped
TCP packets in network statistics. It is useful to see these
numbers separately.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-11-06 09:50:02 -06:00
Robert Lubos 7127f0a742 net: lwm2m: Notify the application on network error
Add a simple backoff mechanism between consecutive registration attempts
in case of registration failures. Finally, notify the application in
case the registration failed several times.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-11-06 12:58:14 +01:00
Robert Lubos 397b2a71fa net: lwm2m: Add a callback to notify socket errors to engine users
Currently, when socket errors occur during receive, the LwM2M engine
restarts the state machine and registers again to the server. While this
works in simple use case (only RD client socket open), it's not a valid
approach when more sockets are open (FW update socket).

Fix this by introducing socket fault callback, which is registered by
the LwM2M engine users. This way, a proper socket owner is notified on
error and can pertake appropriate action.

For RD socket errors the behaviour remains the same - the state machine
is reset and the client registers again to the server. For FW update
socket, handle the error by reopening the socket and retransmitting the
last request. This allows to resume the download from the point the
error occured, w/o a need to start from scratch.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-11-06 12:57:32 +01:00
Robert Lubos d8912fe895 net: lwm2m: Remove handle_separate_response flag
It shouldn't be optional to handle separate response, as it's a
mandatory requirement according to the RFC7252:

"The protocol leaves the decision whether to
 piggyback a response or not (i.e., send a separate response) to
 the server.  The client MUST be prepared to receive either."

Therefore, remove the flag as separate responses are handled now
properly.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-11-03 16:23:59 +01:00
Ehud Naim c58c8b1257 net: buf: change avail_count variable to atomic type
using CONFIG_NET_BUF_POOL_USAGE monitor avail_count,
this variable should be protect.
Protecting it by using atomic variable

Signed-off-by: Ehud Naim <ehudn@marvell.com>
2020-10-28 18:45:11 +02:00
Emil Hammarstrom d3a856289b net: offload: fix k_timeout_t translation in net_offload
Previously blocking calls would be translated to
non-blocking calls.

Signed-off-by: Emil Hammarstrom <emil.hammarstrom@assaabloy.com>
2020-10-28 09:30:53 +02:00
Emil Hammarstrom ec00feef35 net: lib: sockets: added ALPN extension option to TLS
Adds the socket option TLS_ALPN_LIST for SOL_TLS sockets

Passes the configured alpn list to the mbedtls config
on mbedtls init

Signed-off-by: Emil Hammarstrom <emil.hammarstrom@assaabloy.com>
2020-10-22 11:35:43 +03:00
Damian Krolik 62a5179b7b openthread: add openthread_api_mutex_try_lock()
Existing openthread_api_mutex_lock()/unlock() functions are
crucial to assure thread safety of an application which
needs to use OT API directly, but some applications may also
require a non-blocking version of the former for less critical
OT-related tasks.

Add openthread_api_mutex_try_lock() which never waits and
exits immediately if the mutex is held by another thread.

Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
2020-10-20 16:39:22 +03:00
Marek Porwisz 886cf7a9f3 drivers: ieee802154: nrf5: Add support for failed rx notification
Thread implements couple of counters that require notification of failed
frame reception.
Implemented RX failed notification.

Signed-off-by: Marek Porwisz <marek.porwisz@nordicsemi.no>
2020-10-19 12:50:02 +03:00
Oliver Hitz 0c70877ceb net: IPv4 bcast address recognized as multicast
Modified net_ipv4_is_addr_mcast() to not wrongly classify an IPv4
broadcast address as a multicast address.

Signed-off-by: Oliver Hitz <oliver@net-track.ch>
2020-10-09 10:26:38 +03:00
Jackie Ja 1bf00725dc net: websocket: Fix conflict flag
The message type flag will be set to
0x11(WEBSOCKET_FLAG_FINAL(0x01) | WEBSOCKET_FLAG_PING(0x10)) when
receiv PING with final fragment, it conficts with
WEBSOCKET_FLAG_PONG(0x11)

The WEBSOCKET_FLAG_PONG should be 0x20

Signed-off-by: Jackie Ja <qazq.jackie@gmail.com>
2020-10-06 12:02:06 +03:00
Robert Lubos 8880f254b3 net: lwm2m: Remove invalid doc entries
RD client APIs don't return anything, yet return values were documented.
Remove invalid docs.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-10-06 12:01:13 +03:00
Robert Lubos f7a5638871 net: lwm2m: Make bootstrap optional
Currently, after `CONFIG_LWM2M_RD_CLIENT_SUPPORT_BOOTSTRAP` is enabled,
the LwM2M engine will initiate bootstrap procedure on each run. This
approach limits the flexibility of the application, as it's not always
necessary to go over the bootstrap procedure (for instance, the
application may decide to store the security object obtained during the
bootstrap in flash, and restore it on boot).

Fix this by introducing an additional `flags` parameter to the
`lwm2m_rd_client_start()` function, which provides information whether
to run bootstrap in the current session or not.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-10-06 12:01:13 +03:00