Commit graph

1994 commits

Author SHA1 Message Date
Robert Lubos
307694f3d9 net: sockets: Remove support for AF_PACKET/IPPROTO_RAW combination
IPPROTO_RAW is not a valid protocol type for AF_PACKET sockets, which
should only use IEEE 802.3 protocol numbers. Therefore remove support
for this type of sockets.

As an alternative, users can use AF_PACKET/SOCK_DGRAM or
AF_INET(6)/SOCK_RAW, depending on the actual use case.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-04-09 12:36:34 +02:00
Robert Lubos
4f92df61f1 tests: net: socket: Add tests for AF_INET raw sockets
Add test suite verifying AF_INET/AF_INET6 and SOCK_RAW sockets.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-04-09 12:36:34 +02:00
Robert Lubos
a713d8ea60 net: connection: Register connection type
Register connection type along with family and protocol, so that it's
possible to differentiate between connection listening for raw IP
datagrams and TCP/UDP/other packets.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-04-09 12:36:34 +02:00
Jukka Rissanen
e58407c5bf tests: net: dns: packet: Add test case for compression bit in CNAME
Add checks that we will be able to catch invalid compression bit in
response CNAME handling.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-31 22:00:36 +02:00
Jukka Rissanen
b086c9d0f0 tests: net: dns: packet: Add test case for recursive name in CNAME
Add checks that we will be able to catch recursive name pointers and
abandon the response for CNAME handling.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-31 22:00:36 +02:00
Anas Nashif
37c4631a0b tests: remove various filters due to bugs/issue that were fixed
Some platforms were excluded due to issues that were fixed or resolved
themselves. Enable those platforms again and remove the comments related
to the issues.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-03-28 21:52:13 +01:00
Jukka Rissanen
9264c5c941 tests: net: dhcpv4: Fix test case for ignored options
If CONFIG_NET_DHCPV4_OPTION_PRINT_IGNORED is set, then adjust the
tests as we no longer get so many events.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-28 21:51:33 +01:00
Jukka Rissanen
8ec4fba67c net: dhcpv4: Add parsing of broadcast address
Currently we ignore the broadcast address but make sure we
print it in order to avoid unknown option prints.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-28 21:51:33 +01:00
Tom Hughes
a9c5b72a6f tests: net: lib: http_server: Check response
Building with clang, it warns:

tests/net/lib/http_server/core/src/main.c:1400:19: error: variable
'http1_header_capture_common_response' is not needed and will not be
emitted [-Werror,-Wunneeded-internal-declaration]
static const char http1_header_capture_common_response[]
                  ^                             = "HTTP/1.1 200\r\n"

Add a check to make sure the response actually matches the expected
response.

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-03-26 21:56:51 +01:00
Robert Lubos
347653e72a tests: net: mqtt: Add MQTT 5.0 packet encoder/decoder tests
Add new test suite covering MQTT 5.0 packet format.

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
08f8e2f956 tests: net: lib: mqtt: v3_1_1: Add test variant with MQTT 5.0 enabled
Add test variant which enables MQTT 5.0 support. MQTT 3.1.1 should still
work just fine in such case, so it needs to be verified that's the case.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-03-26 16:19:42 +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
Benjamin Cabé
b2c2f905fb tests: lwm2m: add ignored vulnerabilities for CoAPthon3
CoAPthon3 is only used for testing, ignore PYSEC-2019-166.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-24 12:14:20 +01:00
Anas Nashif
56f7dc4c2e scripts: make sure we do not install vulunerable python packages
Make sure we install packages with no issues, some of the issues being
reporting on packages we might install using pip:

Warn: Project is vulnerable to: PYSEC-2019-41 / GHSA-qfc5-mcwq-26q8
Warn: Project is vulnerable to: PYSEC-2014-14 / GHSA-652x-xj99-gmcc
Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56
Warn: Project is vulnerable to: PYSEC-2014-13 / GHSA-cfj3-7x9c-4p3h
Warn: Project is vulnerable to: PYSEC-2018-28 / GHSA-x84v-xcm2-53pg
Warn: Project is vulnerable to: PYSEC-2017-74
Warn: Project is vulnerable to: GHSA-55x5-fj6c-h6m8
Warn: Project is vulnerable to: PYSEC-2014-9 / GHSA-57qw-cc2g-pv5p
Warn: Project is vulnerable to: PYSEC-2021-19 / GHSA-jq4v-f5q6-mjqq
Warn: Project is vulnerable to: GHSA-pgww-xf46-h92r
Warn: Project is vulnerable to: PYSEC-2022-230 / GHSA-wrxv-2j5q-m38w
Warn: Project is vulnerable to: PYSEC-2018-12 / GHSA-xp26-p53h-6h2p
Warn: Project is vulnerable to: PYSEC-2024-4 / GHSA-2mqj-m65w-jghx
Warn: Project is vulnerable to: PYSEC-2023-165 / GHSA-cwvm-v4w8-q58c
Warn: Project is vulnerable to: PYSEC-2022-42992 / GHSA-hcpj-qp55-gfph
Warn: Project is vulnerable to: PYSEC-2023-137 / GHSA-pr76-5cm5-w9cj
Warn: Project is vulnerable to: PYSEC-2023-161 / GHSA-wfm5-v35h-vwf4
Warn: Project is vulnerable to: GHSA-3f63-hfp8-52jq
Warn: Project is vulnerable to: GHSA-44wm-f244-xhp3
Warn: Project is vulnerable to: GHSA-56pw-mpj4-fxww
Warn: Project is vulnerable to: GHSA-j7hp-h8jx-5ppr
Warn: Project is vulnerable to: PYSEC-2023-175
Warn: Project is vulnerable to: PYSEC-2018-34 / GHSA-2fc2-6r4j-p65h
Warn: Project is vulnerable to: PYSEC-2021-856 / GHSA-5545-2q6w-2gh6
Warn: Project is vulnerable to: PYSEC-2019-108 / GHSA-9fq2-x9r6-wfmf
Warn: Project is vulnerable to: PYSEC-2018-33 / GHSA-cw6w-4rcx-xphc
Warn: Project is vulnerable to: PYSEC-2021-857 / GHSA-f7c7-j99h-c22f
Warn: Project is vulnerable to: GHSA-fpfv-jqm9-f5jm
Warn: Project is vulnerable to: PYSEC-2017-1 / GHSA-frgw-fgh6-9g52
Warn: Project is vulnerable to: GHSA-c6fm-rgw4-8q73

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-03-22 14:03:56 -04:00
Robert Lubos
a61287e876 net: lib: tls_credentials: Rename TLS_CREDENTIAL_SERVER_CERTIFICATE
TLS_CREDENTIAL_SERVER_CERTIFICATE credential type is misleading, as in
fact it just represents a public certificate, it does not matter if the
certificate belongs to a server or a client. And actually, it was
already used in-tree for clients as well, for example in LwM2M.

Therefore rename the credential type to a more generic
TLS_CREDENTIAL_PUBLIC_CERTIFICATE and deprecate the old one.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-03-21 14:18:52 +01:00
Jukka Rissanen
7752def63d test: net: ipv6_fragment: Set link layer protocol type for a packet
The test_send_ipv6_fragment_without_hbho() test did not set link layer
protocol type for the packet. It is needed in this case because we
are sending a ready made packet and the protocol type is unknown
otherwise.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-21 09:52:42 +01:00
Jukka Rissanen
4909faf705 tests: net: utils: Add tests for IP address string with mask
Add tests that will verify that IP address with an optional mask
string is properly parsed.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-20 17:16:10 +01:00
Jukka Rissanen
ac3cb9dac0 net: Change the net_linkaddr struct to not use pointers
Previously the net_linkaddr struct had pointers to the link address.
This is error prone and difficult to handle if cloning the packet as
those pointers can point to wrong place. Mitigate this issue by
allocating the space for link address in net_linkaddr struct. This will
increase the size of the net_pkt by 4 octets for IEEE 802.15.4 where the
link address length is 8, but there no increase in size if link address
is 6 bytes like in Ethernet/Wi-Fi.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-17 16:25:22 +01:00
Jukka Rissanen
fedd815c1e tests: net: utils: Verify src and dst link addresses
Make sure that source and destination link addresses are correct
after cloning and pulling net_pkt.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-17 16:25:22 +01:00
Vincent van der Locht
21f839b754 tests: net: mdns: updated interface to match unicast MDNS function
To add the functionality conform rfc6762 chapter 6.7  the interface for
setup_dst_addr(...) has changed. This patch fixes the interface mismatch

Signed-off-by: Vincent van der Locht <vincent@synchronicit.nl>
2025-03-13 16:54:24 +00:00
Robert Lubos
867836741c tests: net: checksum_offload: Increase ztest stack size
The tests crash with a stack overflow on some platforms, therefore
increase the ztest stack size.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-03-12 19:04:44 +01:00
Christoph Seitz
b01b77aa44 tests: net: socket: Check length for AF_PACKET SOCK_DGRAM socket
This test checks that the length returned is not altered
even if the payload resembles a valid IPv4 or IPv6 length.

Signed-off-by: Christoph Seitz <christoph.seitz@infineon.com>
2025-03-12 02:29:02 +01:00
Alberto Escolar Piedras
cb53e40ff9 drivers uart_native_posix: rename to native_pty and support N instances
Rename the driver from uart_native_posix to uart_native_pty.
Including renaming the DTS compatible, and kconfig options, deprecating
the old ones.

And refactor the driver, generalizing it, so we can have any number of
instances.
Note that, unfortunately generalizing to N instances cannot be done
without a degree of backwards compatibility breakage: This driver was
born with all its configuration and selection of the instances based on
kconfig.
When the driver was made to use DT, it was done in a way that required
both DT and kconfig needing to manually coherently enable the 2nd UART.
This has now been fixed, which it means only DT is used to decide how
many instances are avaliable, and UART_NATIVE_POSIX_PORT_1_ENABLE is
just ignored.

Including:
* Deprecate UART_NATIVE_WAIT_PTS_READY_ENABLE: the options is always on
  now as it has no practical drawbacks.
* Deprecate UART_NATIVE_POSIX_PORT_1_ENABLE: DTS intanciation defines it
  being available now.
* Rename a few functions and in general shorten pseudo-tty/pseudo-
  terminal to PTY instead of PTTY.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-11 18:54:02 +01:00
Christoph Seitz
80649dadd3 tests: net: ieee802154: Fix sockaddr_ll protocol handling in tests
Convert all sll_protocol fields to use network byte order in the tests.

Signed-off-by: Christoph Seitz <christoph.seitz@infineon.com>
2025-03-10 15:02:38 +01:00
Christoph Seitz
5340fa49a7 tests: net: socket: Add recvfrom addr validation
Add address length validation and expected source address
checks in packet socket tests.

Signed-off-by: Christoph Seitz <christoph.seitz@infineon.com>
2025-03-10 15:02:38 +01:00
Alberto Escolar Piedras
659af7280a tests: Stop using native_posix/sim transitional headers
As native_posix has been removed, these tests do not need to support
anymore both native_sim and _posix targets, so we can stop using
the transitional headers, and APIs.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-08 08:46:34 +01:00
Jukka Rissanen
c53d02439b tests: net: dns: Add tests for joining mDNS multicast group
Make sure that if mDNS resolver is enabled, we join the mDNS
multicast group so that query responses can be received.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-07 20:28:03 +01:00
Carlo Kirchmeier
4eb917f884 test: net: http: Add compression support in HTTP server
Add tests verifying the functionality of the newly added
accept-encoding based compression support.

Signed-off-by: Carlo Kirchmeier <carlo.kirchmeier@zuehlke.com>
2025-03-07 20:19:44 +01:00
Alberto Escolar Piedras
78f800642a drivers/ethernet/eth_native_posix: Rename to eth_native_tap
Rename this driver to eth_native_tap, including renaming all its
options.
The old options remain until v4.4, but as deprecated.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-07 20:10:38 +01:00
Jukka Rissanen
33cf7dc78a net: http: server: The detail length of wildcard detail was wrong
The path length of the detail resource was not set properly.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-07 20:03:27 +01:00
Noah Olson
b2e29fe0d7 net: tcp: fix ECONNREFUSED not reported by zsock_connect
When a TCP connection is refused during zsock_connect, errno is set
to -ENOTCONN, but errno should be set to -ECONNREFUSED. This change
causes the ECONNREFUSED status to be propagated from tcp_in to
net_tcp_connect, which eventually causes errno to be set
to -ECONNREFUSED.

Signed-off-by: Noah Olson <noah@wavelynx.com>
2025-03-07 19:48:10 +01:00
Alberto Escolar Piedras
6c38bc8ec4 boards native_posix: Remove twister support
native_posix is being removed as it has reached its end of life in 4.2,
after being deprecated since 4.0.

Remove the twister support for native_posix[//64] and therefore all
references to them from the testcases and samples yamls, so twister
does not error out.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-07 19:16:14 +01:00
Jukka Rissanen
9ba79f009b net: arp: Fix ARP protocol handler to not use Ethernet hdr directly
The ARP protocol handler cannot directly access the Ethernet header
because the caller has removed the header already when the handler
is called. So change net_arp_input() and pass source and destination
MAC address there instead of bogus pointer that was pointing to ARP
header instead of Ethernet header. This requires changes to ARP tests.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-02-20 21:04:44 +01:00
Robert Lubos
3089a5d116 tests: net: conn_mgr: Use valid LL address in tests
Using L2 address of length 1 (invalid/unsupported one) confused IPv6
layer during LL address generation - since that length was not a valid
one, the address was not initialized properly and a part of it was set
semi-random. This could result for example in filling out the neighbor
tables.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-02-19 18:48:52 +01:00
Carles Cufi
08a6630a35 tests: nrf: Fix SPDX license tags
Both files are released by Nordic under the Apache v2.0 license, correct
the SPDX tags accordingly.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2025-02-14 20:15:34 +01:00
Tomi Fontanilles
0c368e85b1 secure_storage: add a global registry header file for PSA key IDs
We need to make sure that within Zephyr different users of the PSA APIs
don't interfere with each other because of using the same numerical IDs
for persistent assets.

This takes care of the PSA key IDs when using persistent keys through
the PSA Crypto API.
See the comments in `<zephyr/psa/key_ids.h>` for more information.

This removes the recently-introduced Kconfig options that allowed changing
the base IDs subsystems were using for their persistent keys.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2025-02-13 20:22:09 +01:00
Tom Hughes
2a1cef8649 tests: net: udp: Remove unused function
Building with clang warns:

tests/net/udp/src/main.c:112:31: error: unused function 'if_get_addr'
[-Werror,-Wunused-function]
static inline struct in_addr *if_get_addr(struct net_if *iface)
                              ^

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-02-12 02:24:21 +01:00
Tom Hughes
d6794035cb tests: net: arp: Remove unused function
Building with clang warns:

tests/net/arp/src/main.c:152:31: error: unused function 'if_get_addr'
[-Werror,-Wunused-function]
static inline struct in_addr *if_get_addr(struct net_if *iface)
                              ^

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-02-12 02:24:05 +01:00
Tom Hughes
7179284a0c test: net: shell Remove unused function
Building with clang warns:

tests/net/shell/src/main.c:110:31: error: unused function 'if_get_addr'
[-Werror,-Wunused-function]
static inline struct in_addr *if_get_addr(struct net_if *iface)
                              ^

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-02-12 02:23:21 +01:00
Rene Beckmann
cc33491265 net: mqtt-sn: Wait for register & subscribe to complete
From the MQTT-SN spec:

6.5 Topic Name Registration Procedure

...
At any point in time a client may have only one
REGISTER message outstanding, i.e. it has to wait
for a REGACK message before it can register another
topic name.
...

6.9 Client’s Topic Subscribe/Un-subscribe Procedure

...
As for the REGISTER procedure, a client may have only
one SUBSCRIBE or one UNSUBCRIBE transaction open at a time.
...

Until now, the library did not comply with these requirements.
An additional "waiting" state for topics was introduced:
REGISTER, SUBSCRIBE and UNSUBSCRIBE as an extra step before
switching to REGISTERING, SUBSCRIBING and UNSUBSCRIBING. The
library now makes sure that only one topic can be REGISTERING
and only one topic can be in either SUBSCRIBING or UNSUBSCRIBING.
Additionally, requesting to UNSUBSCRIBE is now denied if the topic
is not yet SUBSCRIBED, to avoid weird race conditions.

Also, added two tests that verify this behavior.

This fixes #84644

Signed-off-by: Rene Beckmann <rene.bckmnn@gmail.com>
2025-02-11 11:44:52 +00:00
Rene Beckmann
25c78a2561 net: mqtt-sn: Use after function in tests
Use an after function to deinit the client.

Signed-off-by: Rene Beckmann <rene.bckmnn@gmail.com>
2025-02-11 11:44:52 +00:00
Tom Hughes
9e85669482 tests: net: socket: Fix -Wsometimes-uninitialized warning
Building with clang warns:

tests/net/socket/tcp/src/main.c:377:13: error: variable 'c_sock' is used
uninitialized whenever 'if' condition is false
[-Werror,-Wsometimes-uninitialized]
        } else if (family == AF_INET6) {
                   ^~~~~~~~~~~~~~~~~~
tests/net/socket/tcp/src/main.c:396:15: note: uninitialized use occurs here
        test_connect(c_sock, s_saddr, addrlen);
                     ^~~~~~
tests/net/socket/tcp/src/main.c:377:9: note: remove the 'if' if its
condition is always true
        } else if (family == AF_INET6) {
               ^~~~~~~~~~~~~~~~~~~~~~~~
tests/net/socket/tcp/src/main.c:360:12: note: initialize the variable
'c_sock' to silence this warning
        int c_sock;
                  ^
                   = 0
tests/net/socket/tcp/src/main.c:377:13: error: variable 's_sock' is used
uninitialized whenever 'if' condition is false
[-Werror,-Wsometimes-uninitialized]
        } else if (family == AF_INET6) {
                   ^~~~~~~~~~~~~~~~~~
tests/net/socket/tcp/src/main.c:387:12: note: uninitialized use occurs here
        test_bind(s_sock, s_saddr, addrlen);
                  ^~~~~~
tests/net/socket/tcp/src/main.c:377:9: note: remove the 'if' if its
condition is always true
        } else if (family == AF_INET6) {
               ^~~~~~~~~~~~~~~~~~~~~~~~
tests/net/socket/tcp/src/main.c:361:12: note: initialize the variable
's_sock' to silence this warning
        int s_sock;
                  ^
                   = 0

Not really needed since we have zassert_unreachable(), but doesn't hurt
to initialize the variables.

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-02-07 02:23:24 +01:00
Noah Olson
37a924be6a net: dns: Fix DNS caching bug
The current DNS caching logic is not aware of the IP address version.
If there is a cached address for a query, the caller of
dns_get_addr_info() will receive that address, even if it is not the
same version as the caller requested. For example:

- dns_get_addr_info() is called to resolve an IPv4 address
- the DNS client caches the IPv4 address that was received
- dns_get_addr_info() is called to resolve an IPv6 address
- the DNS client sees that there is a cached IPv4 address for the
  given query
- the DNS client does not check that the cached address is of the
  requested version (IPv6)
- the cached IPv4 address is returned from dns_get_addr_info()

This changes the DNS client to check IP address version when searching
cached addresses.

Signed-off-by: Noah Olson <noah@wavelynx.com>
2025-02-05 23:49:17 +01:00
Robert Lubos
a31e3537b5 tests: net: tls_ext: Fix scheduling race
After recent kernel changes there's some thread scheduling race when
running tests, therefore add k_yield() at the end of the test to make
sure the network stack has a chance to run in between tests.
Make sure CONFIG_NET_TCP_TIME_WAIT_DELAY is set to 0 so that TCP
connections are released immediately.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-02-04 11:55:17 +01:00
Robert Lubos
32dd87365d tests: net: http_server: core: Fix scheduling race
After recent kernel changes there's some thread scheduling race when
running tests, therefore add k_yield() at the end of each test to make
sure the server thread has a chance to run and do the cleanup.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-02-04 11:55:17 +01:00