From 9d74ef5a11e8b3c2bc2f5e635b294df9aebb6fa5 Mon Sep 17 00:00:00 2001 From: Ameya Deshpande Date: Tue, 21 Sep 2021 16:16:00 +0000 Subject: [PATCH] nix-vector-routing: Add check for remote link-local address in subnet-matching Signed-off-by: Ameya Deshpande --- src/nix-vector-routing/model/nix-vector-routing.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/nix-vector-routing/model/nix-vector-routing.cc b/src/nix-vector-routing/model/nix-vector-routing.cc index d451a09e3..33afd8150 100644 --- a/src/nix-vector-routing/model/nix-vector-routing.cc +++ b/src/nix-vector-routing/model/nix-vector-routing.cc @@ -416,6 +416,13 @@ NixVectorRouting::GetAdjacentNetDevices (Ptr netDevice, PtrGetAddress (k); + if constexpr (!IsIpv4::value) + { + if (remoteDeviceIfAddr.GetScope () == Ipv6InterfaceAddress::LINKLOCAL) + { + continue; + } + } if (netDeviceIfAddr.IsInSameSubnet (remoteDeviceIfAddr.GetAddress ())) { commonSubnetFound = true;