Skip to content

Commit 7777585

Browse files
rlubosnashif
authored andcommitted
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 <[email protected]> (cherry picked from commit 02c153c)
1 parent 816b782 commit 7777585

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/net/ip/ipv6_nbr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1727,7 +1727,7 @@ static inline bool handle_na_neighbor(struct net_pkt *pkt,
17271727

17281728
if (na_hdr->flags & NET_ICMPV6_NA_FLAG_OVERRIDE ||
17291729
(!(na_hdr->flags & NET_ICMPV6_NA_FLAG_OVERRIDE) &&
1730-
tllao_offset && !lladdr_changed)) {
1730+
!lladdr_changed)) {
17311731

17321732
if (lladdr_changed) {
17331733
dbg_update_neighbor_lladdr_raw(

0 commit comments

Comments
 (0)