Commit graph

7,037 commits

Author SHA1 Message Date
Tim Pambor
d40c003513 net: http_server: Add transaction complete status
When the response has been sent completely to the client, the server
reports the new `HTTP_SERVER_TRANSACTION_COMPLETE` status. Together with
the existing `HTTP_SERVER_TRANSACTION_ABORTED` status, the application
can now also for successful completions of requests clean up any
resources allocated for handling the request.

This especially allows to dynamically allocate the response buffer
passed to the server in the request callback and free it when the
request is done.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2026-01-11 13:04:52 +01:00
Tim Pambor
43d3387634 net: http_server: clarify naming of HTTP server callback status enum
Rename enum http_data_status to enum http_transaction_status
to better reflect its purpose, which is to indicate the status of the
overall HTTP transaction, not just data transfer.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2026-01-11 13:04:52 +01:00
Nikhil Namjoshi
9151a32713 net: http: server: Enable HTTP1.0 request compatibility
Per RFC9112 (REF #1), HTTP/1.1 server is expected to be backward
compatible with HTTP1.0 request. Mainly HTTP/1.0 does
not support
1) Transfer Encoding : chunked
2) KeepAlives

So, this change will identify the HTTP protocol
version in the request and respond accordingly.

REF#
1) https://httpwg.org/specs/rfc9112.html

Tested:
1) Verified that HTTP/1.1 requests are served as usual
i.e. with chunked transfer encoding and the connection
is a Keep Alive connection

Query exits after 10s, indicating that the client connection to
the HTTP server is a Keep Alive.

```
time printf "GET /telem HTTP/1.1\r\nHost: 192.0.3.11\r\n\r\n" |
    nc 192.0.3.11 80

real    0m10.185s  <- Indicates connection was kept active for 10s
user    0m0.023s
sys     0m0.023s
```

`Transfer Encoding :  chunked` header and chunked encoding
metadata (chunk size hex bytes, crlf, termination byte 0)
are present in the response.

```
HTTP/1.1 200 OK
Transfer-Encoding: chunked <- Chunked encoding header
Content-Type: text/html

3e8 <- Chunk size hex bytes

:
/health/secondsdevice_ae:9a:22:48:0f:70"seconds0
+
/health/locatedevice_ae:9a:22:48:0f:70"0
/
/network/mac-addressdevice_ae:9a:22:48:0f:70"
.
.
.

3e8 <- Chunk size hex byte
_PLUS_rawdevice_ae:9a:22:48:0f:70"0
6
/dev/ISHARE_CBU_MINUS_rawdevice_ae:9a:22:48:0f:70"0
.
.
.
/dev/part_iddevice_ae:9a:22:48:0f:70"0���������
,
/dev/part_typedevice_ae:9a:22:48:0f:70"0
7
/dev/part_telemetry_disabledevice_ae:9a:22:48:0f:70"0
0 <- Termination Byte 0
```

2) Verfied that HTTP/1.0 requests are served with
response without chunked transfer encoding and the
connection is closed immediately.

Query exits immediately indicating the connection is closed immediately

```
time printf "GET /telem HTTP/1.0\r\nHost: 192.0.3.11\r\n\r\n" |
    nc 192.0.3.11 80

real    0m0.186s <- Indicates connection was terminated immediately.
user    0m0.018s
sys     0m0.030s

```

`Transfer Encoding : chunked` header and chunked encoding
metadata (chunk size hex bytes, crlf) not present in the
response

```
HTTP/1.1 200 OK
Content-Type: text/html

:
/health/uptimedevice_ae:9a:22:48:0f:70"seconds0
+
/health/locatedevice_ae:9a:22:48:0f:70"0
/
/network/mac-addressdevice_ae:9a:22:48:0f:70"
.
.
.
3

/dev/part_iddevice_ae:9a:22:48:0f:70"0���������
,
/dev/part_typedevice_ae:9a:22:48:0f:70"0
7
/dev/can_telemetry_disabledevice_ae:9a:22:48:0f:70"0
```

Signed-off-by: Nikhil Namjoshi <nikhilnamjoshi@google.com>
2026-01-08 11:59:43 +00:00
Chaitanya Tata
b873286d54 net: l2: wifi: Fix channel and band validation
The validation is appliable independent of the implementation.

Partial fix for #101728.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2026-01-07 19:38:55 +01:00
Cristian Bulacu
f262a33a94 net: l2: openthread: Make use of Zephyr OTBR NAT64 translator flag
This commit aims to declare and call NAT64 functions used by Border
Router application only if corresponding flag is also set.

Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
2026-01-07 14:56:06 +00:00
Fabio Baltieri
a09dbee852 net: ipv4: Drop ipv4 mcast packets for non joined groups
Add a check to drop ipv4 multicast packets that are not matching any
currently registered multicast group for the interface that received
them.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2026-01-07 14:55:36 +00:00
Yangbo Lu
0773074474 net: dsa_port: disable IPv4/IPv6 for CPU port
DSA CPU port is only used for DSA management. Let's
disable IPv4/IPv6 for it.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2026-01-07 10:22:02 +01:00
Yangbo Lu
e7c8ab3324 net: mdns_responder: avoid running for IP not enabled iface
For iface which doesn't support IPv4/IPv6, mdns_responder should not be
run.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2026-01-07 10:22:02 +01:00
Yangbo Lu
11dbf5ae7a net: mdns_responder: do not add IPv4 multicast address to iface repeatly
After iface was link up, the IPv4 multicast address was added to iface
repeatly. This patch is to fix this.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2026-01-07 10:22:02 +01:00
Jordan Yates
06cfd76dd2 net: lib: dhcpv4: disable IF_UP handling for HostAP
Disable the automatic handling of the `NET_EVENT_IF_UP` event when the
WPA supplicant is enabled, as the supplicant already explicitly calls
`net_dhcpv4_restart` when the interface is ready for use. This fixes
the DHCP binding process being restarted before the interface is ready
(after `NET_EVENT_IF_UP`, before authorization), which always fails.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2026-01-07 07:45:32 +01:00
Andreas Ålgård
98746a172c net: lib: dhcpv4_server: Add client hardware ID to client_id
This is useful if you specifically need the hardware address
 and not the client_id option.

Signed-off-by: Andreas Ålgård <aal@ixys.no>
2025-12-27 21:00:32 +00:00
Ayush Singh
63ff14e3d8 net: dns: resolve: Combine AR and AN handling
Use the same function to parse all records. The main difference is that
answer record handling matches the answer with the initial query, i.e.
AAAA query will have AAAA answer record. Additional records do not have
any matching with the original query.

Also just warns if an additional record parsing fails. But answer record
parsing is an error.

Tested on BeagleConnect Freedom

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-12-22 20:42:08 +01:00
Ayush Singh
31bc3b016b net: dns: resolve: Add additional record support for PTR query
As described in Section 12 of RFC 6763 [0], DNS-SD responses can contain
SRV, TXT and A/AAAA under additional records. This is done even in the
zephyr DNS service advertisement. So these additional records should be
passed to the user for handling.

Most of the code for additional records is taken from normal dns answer
unpacking. However, I have split the handling into a separate function
since I have only added additional records handling for DNS-SD. The same
code should be usable for answer record as well if required. The main
thing missing from additional record code is that we do not need to
match the query type to the response type.

Tested on BeagleConnect Freedom.

[0]: https://datatracker.ietf.org/doc/html/rfc6763.html#section-12

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-12-22 20:42:08 +01:00
Seppo Takalo
c57042e3ca net: lib: shell: dns: Don't hard code the timeout to 2s
The hard coded 2s timeout might be too small for LTE and Nb-IoT
networks.

Instead use already existing CONFIG_NET_SOCKETS_DNS_TIMEOUT

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2025-12-22 20:39:21 +01:00
Robert Lubos
cf04a04680 net: mqtt: Allow to force native TLS on MQTT socket
Add a parameter to MQTT TLS configuration that allows to force native
TLS on a socket if offload dispatcher is used. This allows for MQTT to
use native TLS implementation with an offloaded TCP socket.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-12-22 14:48:56 +01:00
Alberto Escolar Piedras
074cda5a93 net: websocket: Remove unnecessary includes
Since d45cd6716b this code does not use
types defined in the POSIX_API and therefore we do not need to work
around header include issues.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-12-19 13:53:14 -05:00
Ayush Singh
b0229771d5 net: dns: resolve: Enable discovery of all service instances
The DNS-based Service Discovery has the following abstract:

   This document specifies how DNS resource records are named and
   structured to facilitate service discovery.  Given a type of service
   that a client is looking for, and a domain in which the client is
   looking for that service, this mechanism allows clients to discover
   a list of named instances of that desired service, using standard
   DNS queries.  This mechanism is referred to as DNS-based Service
   Discovery, or DNS-SD.

As is stated here, DNS-based service discovery is designed to find all
instances implementing a service, not just the first one.

Currently, zephyr `dns_resolve_service` will call the callback for only
the first client instance found. It still does receive the responses
from other instances, but those are dropped since the query is already
marked as finished. The seems incorrect behavior.

With that said, the changes in this commit are API breaking, since even
the docs already state that only the first response is currently used.
So I am fine with creating a new function for discovering all instances
if that is more acceptable.

Since DNS-SD queries expect multiple responses, timeout or manual
cancellation are the only methods to stop an in-flight request. When a
timeout happens, the callback is called with one of the following
responses:
- `DNS_EAI_ALLDONE`: If at least one successful response was received.
- `DNS_EAI_CANCELED`: If no successful response was received.

Tested with 3 BeagleConnect Freedoms (2 running mdns_responder and 1
running dns_resolve sample).

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-12-19 10:22:24 +02:00
Jeremy Truttmann
26a08c86f6 net: ethernet: Allow to disable the auto-start of ethernet interfaces
Adds CONFIG_ETH_NET_IF_NO_AUTO_START to allow
pre-configuration of Ethernet interfaces (e.g., filters, mac)
before they become operational. When enabled, net_if_up() must be
explicitly called by the application.

Signed-off-by: Jeremy Truttmann <jetstreeam.code@outlook.com>
2025-12-19 10:22:14 +02:00
Alberto Escolar Piedras
0be25778f7 net: sockets: objcore: Fix net API use
In d45cd6716b the mayority of the
Zephyr codebased was changed to use the Zephyr native net_ prefixed
types, but some were forgotten.
Without this fix/change the code still builds as we are by now setting
CONFIG_NET_NAMESPACE_COMPAT_MODE. But when this is not set, things
fail to build.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-12-18 18:51:59 +00:00
Alberto Escolar Piedras
555887ec11 net: Fix net API use
In d45cd6716b the mayority of the
Zephyr codebased was changed to use the Zephyr native net_ prefixed
types, but some were forgotten.
Without this fix/change the code still builds as we are by now setting
CONFIG_NET_NAMESPACE_COMPAT_MODE. But when this is not set, things
fail to build.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-12-18 18:51:59 +00:00
Alberto Escolar Piedras
455a0436e5 net: zperf: Fix net API use
In d45cd6716b the mayority of the
Zephyr codebased was changed to use the Zephyr native net_ prefixed
types, but some were forgotten.
Without this fix/change the code still builds as we are by now setting
CONFIG_NET_NAMESPACE_COMPAT_MODE. But when this is not set, things
fail to build.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-12-18 14:52:17 +00:00
Sylvio Alves
f8d2e00a0e includes: remove duplicated entries in zephyr-tree
Remove duplicated #include directives within the same
preprocessor scope across the Zephyr tree.

Duplicates inside different #ifdef branches are preserved
as they may be intentional.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-12-17 13:57:38 -05:00
Jukka Rissanen
720408036e net: pkt_filter: Add API for catching UDP/TCP packets
Allow user to setup a hook function that is called for each
received UDP or TCP packet.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-12-17 14:36:01 +02:00
Jukka Rissanen
d5982f0f89 net: dns: Make sure IPv6 address can be stored to a buf
The CONFIG_DNS_RESOLVER_MAX_NAME_LEN should be large enough so that
IPv6 address can be stored into it. So increase the max name length
to 46 if IPv6 is enabled.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-12-15 17:11:29 +00:00
Michael Zimmermann
4759e39122 net: mqtt_sn: Disable support for GWINFO messages
The MQTT-SN v1.2 [0] specification specified the GwAddr as follows:
The GwAdd field has a variable length and contains the address of a GW. Its
depends on the network over which MQTT-SN operates and is indicated in the
first octet of this field. For example, in a ZigBee network the network
address is 2-octet long.

It specifies neither the possible values for the first octet, nor the
format of the network-specific address that follows. Thus, the
specification is incomplete and this functionality unusable.

I also wasn't able to find any implementation which implements a gwinfo
message where the address length is not zero. This includes
https://github.com/eclipse-paho/paho.mqtt-sn.embedded-c .

The current implementation in Zephyr simply copies a `struct sockaddr`
into GwAddr. This is a bad idea for many reasons, the most important one
being that the format is not even specified by POSIX [1]. They only say,
which defines must exist, not what their values are. And in fact, these
even differ between Zephyr and Linux.

Thus, I think it's best to remove the implementation to prevent people from
using this, which may even lead to memory safety issues, depending on the
length of CONFIG_MQTT_SN_LIB_MAX_ADDR_SIZE. If we were to receive an
updated specification, all we'd have to do is to convert between `struct
sockaddr` and mqtt-sn addresses both ways.

[0] https://groups.oasis-open.org/higherlogic/ws/public/download/66091/MQTT-SN_spec_v1.2.pdf
[1] https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_socket.h.html

Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
2025-12-15 07:27:57 -05:00
Jukka Rissanen
2f3e902cd0 net: Start RX before the TX
Honor the comment in the code and make sure RX is started
before TX so that we can receive responses to any data we
are sending.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-12-12 15:38:18 -05:00
Cristian Bulacu
267c3196f6 net: l2: openthread: Bring OT iface up on backbone events
When Ethernet is enabled, `net_config_init_app` function will use the
first found interface that has auto start enabled. In this particular
case, backbone interface will not be able to perform dhcp request
because OpenThread interface gets to be the first interface found
and chose. Openthread will fail this procedure, as it has no
direct connectivity to backbone.
This is why, ethernet app has `CONFIG_IEEE802154_NET_IF_NO_AUTO_START`
set.
In this case, make sure to call net_if_up for OpenThread interface from
border router code when backbone events are triggered.

Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
2025-12-12 09:57:20 -05:00
Chaitanya Tata
d404fa6879 net: lib: shell: Rejig statistics
Use the newly added API to get specific type of stats (if supported) but
also keep the backwards compatibility.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-12-11 16:33:54 -05:00
Chaitanya Tata
f24b902f5e net: l2: ethernet: Add new stats API
Add a new API that takes stat type, the networking stack only needs
NATIVE stats per-packet, it doesn't need to update vendor stats
per-packet. This saves unncessary exchanges in case driver needs to
query the firmware for the vendor stats.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-12-11 16:33:54 -05:00
Gilles Devillers
7e139d6bfe net: mqtt: fix log typo
Fix typo in a log message and remove a redundant “error” mention.

Signed-off-by: Gilles Devillers <gildev@gmail.com>
2025-12-11 16:57:33 +01:00
Alberto Escolar Piedras
cc8bb0427a net: latmon: Fix net API use
In d45cd6716b the mayority of the Zephyr
networking code was changed to use the Zephyr native net_/zsock_
prefixed types, but some symbols were forgotten.
Let's change them.

Without these fixes/changes the code still builds in most cases as we are
by now setting CONFIG_NET_NAMESPACE_COMPAT_MODE.
But when this is not set, things will fail to build.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-12-11 16:57:22 +01:00
Simon Piriou
c1091acd09 net: l2: ieee802154: add support for IEEE802154_CFI_DATA_REQUEST
802.15.4 specifies that a device may send a DATA_REQUEST command to the
coordinator after waiting for "macResponseWaitTime", starting after the
acknowledgment to the association request command.

This change adds support to generate DATA_REQUEST frames and sends one
for the association usecase only. The two other usecases, for MLME-POLL
or for beacon-enabled PAN, are not yet supported.

Signed-off-by: Simon Piriou <spiriou31@gmail.com>
2025-12-11 05:50:58 -05:00
Robert Lubos
2565352d11 net: http: server: websocket: Fix truncated string warning on copying
WS_MAGIC is a constant string and when calculating lengths for copying
we always exclude the NULL terminator. In result, using strncpy() for
copying can generate a warning about truncated string, as WS_MAGIC will
always be truncated from the NULL terminator. Therefore replace
strncpy() with memcpy() as it seems more appropriate for this case.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-12-11 05:48:34 -05:00
Cristian Bulacu
510ccd718f net: ip: net_context: Use sin6_scope_id for link-local IPv6 addresses
This commit aims to make use of sin6_scope_id field of net_sockaddr_in6
structure to correctly choose the network interface when destination
address in link-local.

Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
2025-12-11 05:47:48 -05:00
Julien Vermillard
eef720ff3f net: lwm2m: add send scheduler helper objects
Introduce the optional OMA 10523/10524 send scheduler extension to manage
cached resources, including control and sampling rule objects, cache
filter with gt/lt/st and pmin/pmax handling, max-age/max-sample limits,
and registration flush helper.
Add an overlay to the LWM2M client sample.
Add a fake humidity sensor.

Signed-off-by: Julien Vermillard <julien@clunkymachines.com>
2025-12-09 09:52:11 -05:00
Pieter De Gendt
3695b2c0ca shell: Add user data argument to shell_set_bypass
Allow passing some context to the shell bypass callback function by
providing a void pointer user data argument.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-12-08 09:39:05 -05:00
Markus Becker
ef5495afa8 net: ocpp: readonly is a bool.
GetConfiguration.conf read_only is a bool according to https://openchargealliance.org/wp-content/uploads/2025/04/OCPP_1.6_documentation.zip.

The Python OCPP implementation reports an error if read_only is reported as an integer: ae716a1507/ocpp/v16/datatypes.py (L73)

Signed-off-by: Markus Becker <markushx@gmail.com>
2025-12-08 09:38:26 -05:00
Sam Friedman
5d52e10671 net: coap_client: remove lwm2m from blocksize kconfig option
The block-wise transfer block size is not specific to LWM2M.

Signed-off-by: Sam Friedman <sam@golioth.io>
2025-12-08 06:10:47 -05:00
Marco Widmer
9634425478 net: context: release context mutex before clearing IN_USE flag
A race condition was observed with concurrent net_context_get()
and net_context_unref() calls: If net_context_unref() is interrupted
just after clearing the NET_CONTEXT_IN_USE flag, net_context_get() may
try to reuse the context and reinitialize its mutex through
k_mutex_init(). Once net_context_unref() resumes, it calls
k_mutex_unlock() on the newly initialized mutex, which may lead to the
following assertion:

ASSERTION FAIL [mutex->lock_count > 0U] @ zephyr/kernel/mutex.c

Fix this by unlocking the context mutex before clearing the
NET_CONTEXT_IN_USE flag.

Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
2025-12-04 17:11:25 -05:00
Nikhil Namjoshi
79a7106f9d net: Initialize unspec_addr to avoid -Werror=maybe-uninitialized
The variable 'unspec_addr' in net_dhcpv6_init() is implicitly
initialized on some platforms and optimization levels, but not
guaranteed to be initialized on all code paths when built with
compiler instrumentation.

This leads to a build failure with the strict
'-Werror=maybe-uninitialized' warning when code coverage flags are
enabled (e.g., via twister --coverage).

```
zephyr/subsys/net/lib/dhcpv6/dhcpv6.c:2325:26: error: ‘unspec_addr’
may be used uninitialized [-Werror=maybe-uninitialized]
         net_ipaddr_copy(&net_sin6(&unspec_addr)->sin6_addr,
```

Signed-off-by: Nikhil Namjoshi <nikhilnamjoshi@google.com>
2025-12-04 17:11:17 -05:00
Markus Becker
96944d92f4 net: ocpp: Change Current.OfferedMaximum to Current.Offered
According to
<https://openchargealliance.org/wp-content/uploads/2025/04/OCPP_1.6_documentation.zip>
the Measurand value is called Current.Offered (Maximum current offered
to EV).

Signed-off-by: Markus Becker <markushx@gmail.com>
2025-12-04 14:05:24 -05:00
Chaitanya Tata
466d18d19c net: l2: wifi_shell: Fix MFPR handling
When protocol says MFP is required for WPA3, no point in asking user and
then validating.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2025-12-03 15:36:47 -05:00
Robert Lubos
2c21048ade net: core: Verify interface state in net_try_send_data()
Verify that the interface is in operational UP state before attempting
to send the packet with net_send_data() / net_try_send_data().

So far there's only been an NET_IF_LOWER_UP check in a lower level
function, net_if_try_send_data(), however that didn't work well with
interface like Wi-Fi, whouch could have carrier state set to ON, but
was still not associated with the network (so the interface was no
operational UP). Protocols like ICMP or DHCP, which use net_send_data()
directly, should not be able to send packets in such case.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-12-03 09:12:58 -05:00
Yangbo Lu
8c95e841ec net: dsa: use snprintk instead of snprintf
Used snprintk instead of snprintf as snprintk is compatible
across platforms.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-12-02 11:45:19 +01:00
Yangbo Lu
b46db1e2ea net: net_if: use debug level message for iface down
Dropping packet is normal operation when iface is down.
So, we don't have to use warning here for much noise.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-12-02 11:45:19 +01:00
Yangbo Lu
44463a42d8 net: bridge: enable IPv4/IPv6 support
Ethernet bridge performs L2 forwarding between bridged interfaces.
But for the virtual bridge interface, we could make it perform as
normal Ethernet interface with IP address to use.

This is useful allowing applications to communicate with network,
like LAN router or switch with a host IP.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-12-02 11:45:19 +01:00
Yangbo Lu
684957e9c1 net: bridge: add forward decision support
Added forward decision support including for broadcast,
multicast and local address packets.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-12-02 11:45:19 +01:00
Yangbo Lu
27b8d65b77 net: ethernet: support bridge RX
Added support for bridge RX. We were going to support protocols
on bridge.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-12-02 11:45:19 +01:00
Yangbo Lu
7d22828642 net: bridge: handle RX in bridge_input.c
Current bridge function is very simple which does forwarding for all
packets. There will be more and more features of bridge RX handling.

Let's move bridge RX handling to bridge_input.c for next IPv4/IPv6
protocols support for virtual bridge interface.

And currently there is no path to call bridge_iface_recv function.
Let's rework it for proper function returning NET_CONTINUE.

Also fixed another issue of link local address checking. Because
net_linkaddr structure changed. So fixed

is_link_local_addr((struct net_eth_addr *)net_pkt_lladdr_dst(pkt))

to

is_link_local_addr((struct net_eth_addr *)(net_pkt_lladdr_dst(pkt)->addr))

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-12-02 11:45:19 +01:00
Yangbo Lu
3361dd1939 net: bridge: move bridge files to folder
Moved bridge files to folder to manage. More bridge features
and files will be added in the future.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-12-02 11:45:19 +01:00