Tests showed that mDNS responder needs slightly more stack on certain
platforms, hence increase the default for such case.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
A few issues were identified with DNS_SD segment buffers, making it work
"by chance" (depending on memory layout):
- size check in dns_sd_query_extract() did not take NULL termination
into account, and in result could overflow provided buffer
- the proto_buf in send_sd_response() can either be used to parse
protocol or domain, depending on number of segments in the query.
It should therefore be large enough to hold either.
- Similarily, instance_buf should be able to hold
DNS_SD_INSTANCE_MAX_SIZE, not DNS_SD_SERVICE_MAX_SIZE.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Commit renames deprecated key refresh field.
It still has to exist to allow backward compatibility
with previous versions when data are restored from
the persistent memory.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
The family variable was not initialized and could potentially
be left like that. This could only affect error printout.
Fixes#74796
Coverity-CID: 368799
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
`cmd(buf)` depends on this since it uses `net_buf_id`, which would alias
multiple pools.
Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
Explicitly ignore the return value of net_pkt_read_u8() as the
net_pkt is validated before being queued for transmit within
modem_ppp_ppp_api_send()
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
This file uses strnlen() but the C library
is not require to expose its prototype unless
_POSIX_C_SOURCE is defined.
So let's define it to avoid an implicit function
declaration warning.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Commit add extension of configuration server by large
composition data server.
Mesh Protocol v1.1 specification
4.4.21.1
The Large Composition Data Server is a main model
that extends the Configuration Server model.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
Commit add extension of configuration server by private
beacon server.
Mesh Protocol v1.1 specification
4.4.11.1
The Mesh Private Beacon Server model is a main model
that extends the Configuration Server model.
Configuration server and private beacon server shall always
exist together since they have bound states.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
Use K_WORK defined. This delayed work is never used with any
other timeout than K_NO_WAIT, so the "delayed" part of it
is never actually needed
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
In case of TCP upload error, zperf would leak a socket when running in
asynchronous mode. The upload work have to release the socket it
allocated in any case, regardless of the session result.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
During socket setup, if one of the setsockopt() calls failed, the
function would return an error w/o closing the socket. That's wrong, as
in case of errors the function should clean up any resources it
allocated, the socket file descriptor is lost otherwise and resources
are leaked.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Change updates log level only if UART log backend is enabled in Kconfig
configuration. The log level update is not needed in case logs are
provided over other backend (e.g. RTT).
Change affects both USB stacks.
Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
We should return the errno value in such case, as ret will always be -1
on failure, which might misleading, as it does not give any hint on what
failed.
Also bump the log level of the error message, so the failure is visible
w/o needing to enable debug logs. Such a failure is fatal for the DNS
subsystem, so error level is justified here.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The `dns_data` buffer, allocated by the DNS dispatcher was dereferenced
twice - once in registered DNS handler, second time in the dispatcher
itself.
Since the buffer was allocated by the dispatcher, and it's not really
guaranteed that the buffer will be freed in the registered handler (this
depends on the processing outcome, the function may return early w/o
freeing the net buf in case of errors), it makes most sense for the
dispatcher to keep ownership of the buffer. Hence, the registered
handlers will no longer release the buffer provided in any case, and the
dispatcher will free it on exit.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Use PDU_BIS_LLID_FRAMED in empty PDUs for framed BIS
Allocate room for header when calculating max_pdu for framed BIS
Set group_sync_delay, stream_sync_delay and framed properly for BIS
broadcaster
Add missing call to isoal_tx_event_prepare() for BIS
Signed-off-by: Troels Nilsson <trnn@demant.com>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
- Assign sync_delay parameters for ISO-AL sink creation
- Store framing information from BIGinfo for use in sink creation
- Set max_octets for sink creation
Signed-off-by: Morten Priess <mtpr@oticon.com>
This can be useful if application developers
want to print them in the applications.
Later we can also use them in
the host to improve debuggability.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
This API converts a SMP error code to a string.
This can be useful if application developers want
to print them in the applications.
BT_SMP_ERR_SUCCESS was added for completeness.
Later we can also use them in the host to improve debuggability.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
This can be useful if application developers
want to print them in the applications.
Later we can also use them in
the host to improve debuggability.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
In ethernet_recv(), it will call ethernet_update_length() to check for
ipv4 or ipv6 packet if it needs to get rid of the padding in the
packets. But for EAPOL packets, no need to do this, which may modify
the packet length of EAP type packet wrongly and leads to EAPoL
packets dropped in supplicant.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Split wifi interface into station mode and soft-AP mode, as there may be
station and soft-AP two interfaces that work concurrently.
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Commit aligns usage mesh and host PSA.
Since PSA crypto is supported in host then
there is no reason to switch off some of host
features to get rid of tinycrypt functions in
the final image.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
Similar to ISO connections, ACL connections are not serviced as fast as
possible. Change this, and try to send as much as we have resources for.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
ISO connections that were in the TX queue were not getting serviced in
time. This happens because `iso_data_pull()` returns `NULL` when that
particular connection (`conn`) is done sending.
But it doesn't trigger the TX processor again to process other channels in
the queue. This patch fixes that by calling `bt_tx_irq_raise()`.
We can't do this from `conn.c` as we don't know if the `NULL` returned is
because the current channel is out of data or because it has data but it
can't send it (e.g. the current buf is being "viewed" already).
Fixes https://github.com/zephyrproject-rtos/zephyr/issues/74321
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
This makes it more clear what is happening when the host cancels
connection creation where the controller raises
the connection complete event with status set to
"UNKNOWN CONNECTION IDENTIFIER (0x02)".
This is especially useful for developers not familiar with this
detail in the spec.
See also: Core_v5.4, Vol 4, Part E, Section 7.8.13,
LE Create Connection Cancel command.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Generally, we should avoid using reserved names in global
contexts.
subsys/net/lib/ptp/clock.c:58:25: \
error: 'clock' redeclared as different kind of symbol
58 | static struct ptp_clock clock = { 0 };
/opt/toolchains/zephyr-sdk-0.16.8/arm-zephyr-eabi/picolibc/ \
include/time.h💯12: \
note: previous declaration of 'clock' with type 'clock_t(void)' \
{aka 'long unsigned int(void)'}
100 | clock_t clock (void);
subsys/net/lib/ptp/clock.c:58:25: \
error: 'clock' defined but not used [-Werror=unused-variable]
58 | static struct ptp_clock clock = { 0 };
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Created tracing APIs to trace the enter and (exit + result) of
SYS_INIT and DEVICE_DT_DEFINE (and friends).
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
If filesystem relies on zfp flags being set after open, this can lead to
inconsistency with the current implementation of FS_O_TRUNC.
Move the assignment of zfp->flags before any other call to fs api to avoid
such issues.
Signed-off-by: Pierrick Guillaume <pierguill@gmail.com>
`CONFIG_CONFIG_SETTINGS_FS` has been deprecated for
more than 2 releases, remove it and its associated source
code.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
`CONFIG_LOG_DOMAIN_ID` has been deprecated for years and
shouldn't be used according to its documentation, remove it.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
`CONFIG_BT_DEBUG_LOG` has been deprecated for more than 2
releases, replace it with `CONFIG_BT` + `CONFIG_LOG`:
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
`lwm2m_engine_get_resource()` has been mark for deprecation for
more than 2 releases, but we are still using it in tree now,
because the `__deprecated` marker was probably forgotten in the
initial deprecation commit.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
These functions have been deprecated for more than 2 releases,
remove them:
- zephyr_smp_rx_req
- zephyr_smp_alloc_rsp
- zephyr_smp_free_buf
Signed-off-by: Yong Cong Sin <ycsin@meta.com>