From 51c58d90807914482a070a58bdff1eeae420dd44 Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Tue, 16 Aug 2022 13:21:51 -0700 Subject: [PATCH] [slaac] only allow SLAAC for prefixes with 64-bit length (#8021) This commit updates `Slaac` module to only allow prefixes with 64-bit length. --- src/core/utils/slaac_address.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/utils/slaac_address.cpp b/src/core/utils/slaac_address.cpp index 82cadfcba..af5aa021c 100644 --- a/src/core/utils/slaac_address.cpp +++ b/src/core/utils/slaac_address.cpp @@ -204,7 +204,8 @@ void Slaac::Update(UpdateMode aMode) { Ip6::Prefix &prefix = config.GetPrefix(); - if (config.mDp || !config.mSlaac || ShouldFilter(prefix)) + if (config.mDp || !config.mSlaac || (prefix.GetLength() != Ip6::NetworkPrefix::kLength) || + ShouldFilter(prefix)) { continue; }