Commit graph

21541 commits

Author SHA1 Message Date
Eric Holmberg
d7bf4b3ddd logging: backend_fs: disable ANSI color for filesystem logging
Before the fix for #77150 was merged, with LOG_BACKEND_SHOW_COLOR=n and
CONFIG_SHELL_VT100_COLORS=y the shell would still display colors by
enabling the flag in the shell_log_backend.c.

Now, LOG_BACKEND_SHOW_COLOR has to be enabled to allow shell logging
color, but that writes ANSI escape sequences to the log files.

Explicitly disable ANSI color output for the filesystem logging backend.

Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
2025-03-27 09:50:59 +01:00
Kiara Navarro
9207a1bcd7 fs: update module logging registration
All modules registered in fs subsystem uses:

LOG_MODULE_REGISTER(<module>, <log level>)

Lets update fs to follow same logic.

Signed-off-by: Kiara Navarro <knavarro@paltatech.com>
2025-03-27 03:50:22 +01:00
Jukka Rissanen
17a4315998 net: mdns_responder: Print return value if error in socket call
If socket call fails when mdns_responder creates listeners, then
print the return value to make it easier to figure out what is
wrong. Typically one needs to increase the size of
CONFIG_ZVFS_OPEN_MAX if errno is ENFILE.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-26 21:57:18 +01:00
Maximilian Deubel
916897f59e lib: tls_credentials: return size even if too big
The simple backend returns the size of the credential,
even if it is too big.
The secure backend should do the same,
our libraries depend on this behaviour.

Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
2025-03-26 16:22:28 +01:00
Jukka Rissanen
2e3f564a95 wifi: shell: Allow setting band to 0 in connect
The help text for connect says

[-b, --band] 0: any band (2:2.4GHz, 5:5GHz, 6:6GHz]

but it disallows setting band to 0. Change this and allow
band 0 option when doing normal connect. Disallow setting
the band 0 when enabling AP mode.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-26 16:22:01 +01:00
Jukka Rissanen
a8da7d652f wifi: shell: Map negative status code to valid status codes
The negative status code is actually the errno which we might
get returned from lower levels. For example if user sets -t
(timeout) option, the -ETIMEDOUT might be returned. In this case
map the errno value to connection timeout status value.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-26 16:22:01 +01:00
Jukka Rissanen
92da8cb69f wifi: shell: Return text description of connection error
If "wifi connect" fails, tell user why in textual format.
This helps debugging connectivity issues.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-26 16:22:01 +01:00
Tom Hughes
918ae79522 net: mdns_responder: Replace pragma with TOOLCHAIN_DISABLE macro
These macros were recently introduced and replaced everywhere (#84065),
but this was missed.

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-03-26 16:20:26 +01:00
Robert Lubos
8935579d0a net: mqtt: Improve disconnect error notification for MQTT 5.0
As MQTT 5.0 allows to specify the disconnect reason in the Disconnect
packet, use this new feature to improve error notification to the
broker, according to the error guidelines in the MQTT 5.0 spec.
For most cases, a generic arbitrary mapping between errno values and
reason codes is used, however the parser can specify the disconnect
reason code manually to better handle certain corner cases (like invalid
topic alias used).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-03-26 16:19:42 +01:00
Robert Lubos
e9da3b3e0c net: mqtt: Add support for MQTT 5.0 topic aliases
Add support for handling topic aliases received from the broker.
The MQTT client implementation will store received topic for further use
in case consecutive PUBLISH received from the broker contains no topic
but alias only.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-03-26 16:19:42 +01:00
Robert Lubos
1d743fa65a net: mqtt: Add support for MQTT 5.0 AUTH packet
Add support for a new AUTH message introduced in MQTT 5.0.
This is a new mechanism specified by MQTT 5.0, which allows clients and
brokers for enhanced authentication in between CONNECT and CONNACK
exchange. An additional MQTT event (MQTT_EVT_AUTH) was specified which
is triggered when the AUTH packet arrives from the broker.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-03-26 16:19:42 +01:00
Robert Lubos
55e1c10894 net: mqtt: Add MQTT 5.0 support for DISCONNECT
Add support for DICONNECT message specified in MQTT 5.0.
As with MQTT 5.0, the disconnect can now also be initiated by the
broker, it was needed to add decoder support for the message.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-03-26 16:19:42 +01:00
Robert Lubos
2459ffae41 net: mqtt: Add MQTT 5.0 support for SUBACK/UNSUBACK
Add support for SUBACK/UNSUBACK messaged specified in MQTT 5.0.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-03-26 16:19:42 +01:00
Robert Lubos
efd795b066 net: mqtt: Add MQTT 5.0 support for SUBSCRIBE/UNSUBSCRIBE
Add support for SUBSCRIBE/UNSUBSCRIBE messages specified in MQTT 5.0.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-03-26 16:19:42 +01:00
Robert Lubos
c21e64251b net: mqtt: Add MQTT 5.0 support for PUBLISH ACKs
Add support for PUBACK, PUBREC, PUBREL and PUBCOMP specified in MQTT
5.0. As all of these acknowledgment packets have similar format,
introduced a common encoder/decoder to handle ACK packets.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-03-26 16:19:42 +01:00
Robert Lubos
15ad90aceb net: mqtt: Add MQTT 5.0 support for PUBLISH
Add support for PUBLISH message specified in MQTT 5.0. The message
encoder and decoder were updated to support MQTT properties.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-03-26 16:19:42 +01:00
Robert Lubos
6038676b83 net: mqtt: Add MQTT 5.0 support for CONNACK
Add support for CONNACK message specified in MQTT 5.0, along with
property decoders required to decode MQTT properties. Decoded properties
are provided to the application within mqtt_connack_param structure,
accompanying the CONNACK event.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-03-26 16:19:42 +01:00
Robert Lubos
8fe2965500 net: mqtt: Add MQTT 5.0 support for CONNECT
Add support for CONNECT message specified in MQTT 5.0, along with
property encoders required to encode MQTT properties which is a new
concept in MQTT 5.0. Connect and will properties can be specified by the
application in the mqtt_client structure before connecting.

Introduce a helper function which allows to verify whether MQTT 5.0 is
used or not, so that it's still possible to use MQTT 3.1 even if MQTT
5.0 support is enabled in Kconfig.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-03-26 16:19:42 +01:00
Robert Lubos
1eb9a5c241 net: mqtt: Fix helper macro for encoded binary data length
The macro did not take into account the 2-byte binary data length
encoded before the actual binary data.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-03-26 16:19:42 +01:00
Robert Lubos
f31a45f57c net: mqtt: Add Kconfig to select maximum supported MQTT version
It should be possible to select maximum supported MQTT version, so that
for example MQTT 5.0 features can be compiled-out in case they're not
needed.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-03-26 16:19:42 +01:00
Håvard Reierstad
200628e8d0 Bluetooth: Mesh: Disable prov bearers on link
Previously, PB-GATT unprovisioned advs would continue being sent if a
device is provisioned or in the process of being provisioned (an active
provisioning link) over PB-ADV.

This commit introduces the `link_cancel` callback for the `prov_bearer`
struct. When a provisioning link is established over a prov bearer, all
other (active) prov bearers will be suspended through this callback, and
re-enabled when the link is closed. An exception is made for PB-REMOTE,
which can utilize the other bearers.

The call to `bt_mesh_pb_gatt_srv_disable` in settings.c is removed. This
is called in `mesh_commit`, and is not needed as this is only used
during boot, at which point the Mesh provisioning service has not yet
been enabled/registered, meaning the function does nothing.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2025-03-26 16:19:31 +01:00
Vinayak Kariappa Chettimada
1dfc53fd21 Bluetooth: Controller: Fix ull_hdr_get_cb for Peripheral role
Fix ull_hdr_get_cb() for advanced scheduling to return
ticks_slot for Peripheral role.

Relates to commit d6c3e04eb8 ("Bluetooth: Controller:
Central maximum data PDU size time spacing").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2025-03-26 16:19:19 +01:00
Tomasz Moń
75109707e3 usb: device_next: Do not add serial number without HWINFO
For many devices iSerialNumber is not required. The only device class
currently supported in Zephyr that requires iSerialNumber is MSC. If the
serial number is not available then iSerialNumber must be 0. Failure to
read the string descriptor for non-zero iSerialNumber fails USB Command
Verifier Chapter 9 tests.

When USBD_DESC_SERIAL_NUMBER_DEFINE() was used without CONFIG_HWINFO
then it did lead to runtime failure when requesting the string (thus
failing certification).

Fail USBD_DESC_SERIAL_NUMBER_DEFINE() at build-time if CONFIG_HWINFO is
not set to prevent the surprise at runtime. Only define serial number
descriptors if CONFIG_HWINFO is enabled.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-03-26 16:18:56 +01:00
Ivan Iushkov
ded9c1f44d bluetooth: CS: add bt_le_cs_get_antenna_path()
added function to calculate antenna path
based on the antenna permutation index and
total number of antenna paths

Signed-off-by: Ivan Iushkov <ivan.iushkov@nordicsemi.no>
2025-03-26 11:32:57 +01:00
Seppo Takalo
05abdf5d0b net: lwm2m: Deprecate LWM2M_ENGINE_MESSAGE_HEADER_SIZE
Kconfig value LWM2M_ENGINE_MESSAGE_HEADER_SIZE added
an extra headroom for CoAP packet sizes so that
if CoAP Block-Wise transfer block-size is configured
to be same as LWM2M_COAP_MAX_MSG_SIZE, the full
payload block would usually fit to the datagram.

This causes too much confusion to be usable.
CoAP headers and options vary on sizes, and there is
no runtime limitations that we should check the
header size against.

Only real limitation is the CoAP packet size, which
must fit into the UDP datagram with typical DTLS headers.

Only limitation for CoAP block-size then is that
it must fit into the CoAP message with all the headers
and options. But as the option sizes, like path, vary,
it must be checked runtime.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2025-03-26 11:32:23 +01:00
Pieter De Gendt
044a94f06a net: lib: coap: coap_server: Use eventfd instead of socket pair
Convert the socket poll logic to use a more lightweight eventfd file
descriptor instead of a socket pair.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-03-26 08:55:45 +01:00
Johann Fischer
21f4a7db60 usb: device_next: always reset endpoints to defaults on SetInterface
Disable/enable endpoints even if the new alternate is the same as the
current one, forcing the endpoint to reset to defaults.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-03-26 07:08:06 +01:00
Johann Fischer
87caef4389 usb: device_next: keep loopback function transfers going
Do not report canceled transfers as an error and continue the transfers
regardless of the previous transfer status.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-03-26 07:08:06 +01:00
Lyle Zhu
22ea55c7a0 Bluetooth: Classic: Move classic functions from conn.c to conn_br.c
Move functions `bt_sco_cleanup()`, `bt_conn_create_br()`,
`bt_hci_connect_br_cancel()`, and `bt_conn_get_dst_br()` from `conn.c`
to `conn_br.c`.

Change the function `bt_hci_connect_br_cancel()` to internal public
function.

Add a header file `conn_br_internal.h`. And declare the function
`bt_hci_connect_br_cancel()` in the header file.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-03-25 22:15:19 +01:00
Håvard Reierstad
c77587a76b Bluetooth: Host: Clarify use of identity in docs
Clarifies the use of identity in `bluetooth.h` by specifying whether the
documentation refers to the identity address, i. e. the actual address
`bt_addr_le_t`, or the identity handle, i. e. an index corresponding to
a specific identity address.

Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
2025-03-25 22:14:55 +01:00
Hake Huang
1847b882a2 tests: ztest: enable ztest_no_yield for all in PM
if CONFIG_PM=y, board will enter low power,
which will cause problem for debugger.
So for ztest cases, we need enable this to avoid problem.
This used to apply to soc/platform level, now remove them.

Signed-off-by: Hake Huang <hake.huang@nxp.com>
2025-03-25 22:14:20 +01:00
Troels Nilsson
e486a06f0b Bluetooth: Controller: Remove unneeded members from ull_hdr
Several members of the ull_hdr can be removed, saving 12 bytes
from all ULL instances used (and a bit of code as well)

ticks_active_to_start is always 0 and can be removed completely

ticks_prepare_to_start is always set to
HAL_TICKER_US_TO_TICKS(EVENT_OVERHEAD_XTAL_US), so replace usage
of it by this constant

ticks_preempt_to_start is always set to
HAL_TICKER_US_TO_TICKS(EVENT_OVERHEAD_PREEMPT_MIN_US), so replace
usage of it by this constant

In addition, remove logic handling usage of XON_BITMASK since it
was only used by the long removed legacy LL

Signed-off-by: Troels Nilsson <trnn@demant.com>
2025-03-25 22:13:58 +01:00
Troels Nilsson
a87e8dce7d Bluetooth: Controller: Fix lost_payloads calculation for FT > 1
The lost_payloads calculation in ull_conn_iso_start() could easily
end up negative for CIS with FT > 1; Add a check to avoid this

Signed-off-by: Troels Nilsson <trnn@demant.com>
2025-03-25 22:13:45 +01:00
Jukka Rissanen
f7d37ea87c net: ipv4: Add DiffServ DSCP code point definitions
Add DSCP defines for cases where the IPv4 packets need
classification.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-25 11:00:33 +01:00
Aleksandr Khromykh
928208cf36 Bluetooth: Mesh: to not set valid state if mesh is not valid yet
Commit sets valid state when mesh is actualy provisioned.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2025-03-25 11:00:22 +01:00
Seppo Takalo
15b0f9033b modem: cmux: Do not return error on low buffer space
If we end up writing zero bytes to cmux output, we can return
zero instead of -ENOMEM as it would break various modules when
using small buffers. For example modem_chat.c does not tolerate
-ENOMEM but handles zero OK.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2025-03-24 19:33:07 +01:00
Seppo Takalo
c78081e5cf modem: modem_cellular: Configurable MTU for CMUX
Allow configuring MTU for CMUX.
Some AT manual and specification define this as a
frame size. Linux ldattach default to 127 bytes,
3GPP TS 27.010 defaults to 31.

We should limit our CMUX frames to a size that
remote end is capable of handling.
Linux silently drops oversized frames.

Also, remove MODEM_CELLULAR_CMUX_MAX_FRAME_SIZE as
this was only limiting a buffer sizes, and resulted
CMUX frames to be capped to same value.
Use MODEM_CMUX_WORK_BUFFER_SIZE and MODEM_CMUX_MTU instead.

Also rename CONFIG_MODEM_CELLULAR_CHAT_BUFFER_SIZES to
CONFIG_MODEM_CELLULAR_CHAT_BUFFER_SIZE as it is now
only used as a Chat module. DLCI pipes use
CONFIG_MODEM_CMUX_WORK_BUFFER_SIZE.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2025-03-24 19:33:07 +01:00
Lyle Zhu
b78b855d04 Bluetooth: Classic: L2CAP: Fix building warnings
Use `UINT_TO_POINTER` to convert a number to pointer.
Use `POINTER_TO_UINT` to get a number from a pointer.

Fixes #87527.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-03-24 19:24:16 +01:00
Ingar Kulbrandstad
a65a16424b Bluetooth: Mesh: Fix proxy advertiser handling with GATT server enabled
When the GATT server is enabled the proxy advertiser
server need to be stopped. This solved a bug where the
Mesh Proxy Service is not restared.
This fix is done to fix several failing PTS test that
was failing when CONFIG_BT_MESH_ADV_EXT_GATT_SEPARATE
was enabled. Calling the stop_proxy_adv was left out
in a prevouis commit when doing code cleanup.

Signed-off-by: Ingar Kulbrandstad <ingar.kulbrandstad@nordicsemi.no>
2025-03-24 19:23:45 +01:00
Pavel Vasilyev
7592b049ef bluetooth: mesh: pb_adv: Fix resending Generic Transaction Ack PDU
The Generic Provisioning protocol requires that a transaction must be
acknowledged before the next Generic Provisioning PDU is processed
(section 5.3.3, MshPRT_v1.1).

In the current PB-ADV implementation, if there is an ongoing transaction
(link.tx.adv points to a valid advertisement), any received Generic
Provisioning Start and Continuation PDUs are ignored.

This creates a scenario where a remote device misses the Transaction
Acknowledgment PDU and retransmits the last PDUs, but they are ignored
by the local device because the local device has already started sending
the next Provisioning PDU.

In particular, in the observed failure, the Provisioner missed the
Generic Transaction Acknowledgment PDU during the transmission of the
Provisioning Data PDU.

This commit modifies the processing logic for Generic Provisioning Start
and Continuation PDUs by checking if the received PDU has already been
received. If so, it attempts to re-send the Generic Transaction
Acknowledgment PDU.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2025-03-24 15:10:39 +01:00
AbdElRahman Khalifa
b11703623c net: Add support for IPv4_MULTICAST_LOOP in net_context
Add support for the IP_MULTICAST_LOOP socket option to control
multicast packet loopback.

Signed-off-by: AbdElRahman Khalifa <abdelrahman.5alifa@gmail.com>
2025-03-24 09:54:05 +01:00
Emil Gydesen
159de4c0b9 Bluetooth: Controller: Fix dependency for connected ISO Kconfigs
The options for BT_CTLR_CENTRAL_ISO and
BT_CTLR_PERIPHERAL_ISO did not have the proper defaults not
dependencies when BT_LL_SW_SPLIT=y

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-03-24 07:58:00 +01:00
Johann Fischer
f6d338c1b1 usb: host: fix set/clear feature shell commands
Implement Set/Clear Feature endpoint halt request and
fix the corresponding commands in the shell.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-03-24 07:53:21 +01:00
Johann Fischer
9be4c0fed3 usb: host: fix shell device commands
The device command is broken due to the overhaul of how USB devices are
handled in the host stack. Add a device address argument to all device
commands and obtain a pointer to the USB device during command
execution.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-03-24 07:53:21 +01:00
Damian Krolik
fa8eef0fbc settings: shell: improve reading and writing string values
Make reading and writing string values more flexible:
1. Eliminate the intermediate buffer when saving a string
   setting. This needlessly limited the maximum string
   length that could be saved using the shell command.
2. Do not add nor assume that a string saved in the settings
   includes the null-terminator. The settings subsystem uses
   metadata for encoding the value length, so there it is
   redundant to also store the null-terminator in flash.

By the way, also make sure the command handlers only return
-EINVAL and -ENOEXEC error codes as documented in the
handler type description.

Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
2025-03-22 02:40:56 +01:00
Luca Burelli
3fcd90339d llext: optimize allocations for read-only sections
When loading an extension, read-only sections that do not have
relocations and whose data is accessible from the ELF buffer can be
directly mapped as-is in the extension memory. This avoids the need to
allocate and copy unmodified data from the ELF buffer to the LLEXT heap.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-03-21 14:41:30 -04:00
Luca Burelli
e5594891ac llext: stricter alignment checks for MPU/MMU regions
This patch moves the alignment checks for MPU and MMU regions to the
beginning of the llext_copy_region() function. This is done to ensure
that the correct region alignment and size are used even in the case
where the region is reused from the ELF file buffer, avoiding MMU/MPU
configuration issues.

This also relaxes the same checks for regions that are accessed by the
kernel only (e.g. symbol and string tables), which do not need special
MMU/MPU treatment. This exposed an inconsistency in the MMU code, which
was setting the permission on the correct regions, but later restoring
the default permissions on every region, including the now-unaligned
ones.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-03-21 14:41:30 -04:00
Luca Burelli
6c2b5f6c92 llext: introduce 'enum llext_storage_type'
This patch introduces an 'enum llext_storage_type' that defines the
storage type of the ELF data that will be loaded:

- LLEXT_STORAGE_TEMPORARY: ELF data is only available during
  llext_load(); even when the loader supports directly accessing the
  memory via llext_peek(), the buffer contents will be discarded
  afterwards.
  LLEXT will allocate copies of all required data into its heap.

- LLEXT_STORAGE_PERSISTENT: ELF data is stored in a *read-only* buffer
  that is guaranteed to be always accessible for as long as the
  extension is loaded.
  LLEXT may directly reuse constant data from the buffer, but may still
  allocate copies if relocations need to be applied.

- LLEXT_STORAGE_WRITABLE: ELF data is stored in a *writable* memory
  buffer that is guaranteed to be always accessible for as long as the
  extension is loaded.
  LLEXT may freely modify and reuse data in the buffer; so, after the
  extension is unloaded, the contents should be re-initialized before a
  subsequent llext_load() call.

To keep full compatibility with existing code, the storage type of
LLEXT_BUF_LOADER is determined by the CONFIG_LLEXT_STORAGE_WRITABLE Kconfig
option between LLEXT_STORAGE_PERSISTENT and LLEXT_STORAGE_WRITABLE.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-03-21 14:41:30 -04:00
Luca Burelli
63142a377a llext: (cosmetic) add allocated size to debug message
Adding this information allows easy cross-reference of the effects of
memory optimization changes between subsequent commits.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-03-21 14:41:30 -04:00
Jukka Rissanen
cc282e56e8 net: mdns_responder: Use memcpy instead of strncpy for iface name
Following warning is printed if using strncpy(), so use memcpy()
instead. Note that this is false positive as there is no error here but
in order to avoid the warning, change the copy function.

subsys/net/lib/dns/mdns_responder.c:1371:25: warning:
'strncpy' output may be truncated copying 7 bytes from a string
of length 8 [-Wstringop-truncation]
 1468 | strncpy(if_req.ifr_name, name, sizeof(if_req.ifr_name) - 1);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

subsys/net/lib/dns/mdns_responder.c:1468:25: warning:
'strncpy' output may be truncated copying 7 bytes from a string
of length 8 [-Wstringop-truncation]
 1468 | strncpy(if_req.ifr_name, name, sizeof(if_req.ifr_name) - 1);
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-21 17:05:10 +01:00