nix-vector-routing: Add check for remote link-local address in subnet-matching

Signed-off-by: Ameya Deshpande <ameyanrd@outlook.com>
This commit is contained in:
Ameya Deshpande
2021-09-21 16:16:00 +00:00
committed by Tommaso Pecorella
parent 9876391c6d
commit 9d74ef5a11

View File

@@ -416,6 +416,13 @@ NixVectorRouting<T>::GetAdjacentNetDevices (Ptr<NetDevice> netDevice, Ptr<Channe
for (uint32_t k = 0; k < remoteDeviceAddresses; ++k)
{
IpInterfaceAddress remoteDeviceIfAddr = remoteDeviceInterface->GetAddress (k);
if constexpr (!IsIpv4::value)
{
if (remoteDeviceIfAddr.GetScope () == Ipv6InterfaceAddress::LINKLOCAL)
{
continue;
}
}
if (netDeviceIfAddr.IsInSameSubnet (remoteDeviceIfAddr.GetAddress ()))
{
commonSubnetFound = true;