From 02bb15d5643e30ed29712979c913b74c71df9399 Mon Sep 17 00:00:00 2001 From: Robert Lubos Date: Wed, 12 Feb 2025 13:08:41 +0100 Subject: [PATCH] net: ipv6: Fix Neighbor Advertisement processing w/o TLLA option According to RFC 4861, ch. 7.2.5: "If the Override flag is set, or the supplied link-layer address is the same as that in the cache, or no Target Link-Layer Address option was supplied, the received advertisement MUST update the Neighbor Cache entry as follows ... If the Solicited flag is set, the state of the entry MUST be set to REACHABLE" This indicates that Target Link-Layer Address option does not need to be present in the received solicited Neighbor Advertisement to confirm reachability. Therefore remove `tllao_offset` variable check from the if condition responsible for updating cache entry. No further changes in the logic are required because if TLLA option is missing, `lladdr_changed` will be set to false, so no LL address will be updated. Signed-off-by: Robert Lubos (cherry picked from commit 02c153c8b1898c21f55f5dc6d890f1534a227123) --- subsys/net/ip/ipv6_nbr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subsys/net/ip/ipv6_nbr.c b/subsys/net/ip/ipv6_nbr.c index 62c53b0c9871..b04c475d7175 100644 --- a/subsys/net/ip/ipv6_nbr.c +++ b/subsys/net/ip/ipv6_nbr.c @@ -1730,7 +1730,7 @@ static inline bool handle_na_neighbor(struct net_pkt *pkt, if (na_hdr->flags & NET_ICMPV6_NA_FLAG_OVERRIDE || (!(na_hdr->flags & NET_ICMPV6_NA_FLAG_OVERRIDE) && - tllao_offset && !lladdr_changed)) { + !lladdr_changed)) { if (lladdr_changed) { dbg_update_neighbor_lladdr_raw(