internet: Fix return value of Ipv{4,6}AddressGeneratorImpl::IsAddressAllocated() (issue reported by Sharan Naribole)

This commit is contained in:
Stefano Avallone
2023-07-29 15:15:59 +02:00
committed by Stefano Avallone
parent f49887080a
commit 1503ca9e9b
2 changed files with 4 additions and 4 deletions

View File

@@ -469,10 +469,10 @@ Ipv4AddressGeneratorImpl::IsAddressAllocated(const Ipv4Address address)
{
NS_LOG_LOGIC("Ipv4AddressGeneratorImpl::IsAddressAllocated(): Address Collision: "
<< Ipv4Address(addr));
return false;
return true;
}
}
return true;
return false;
}
bool

View File

@@ -594,10 +594,10 @@ Ipv6AddressGeneratorImpl::IsAddressAllocated(const Ipv6Address address)
{
NS_LOG_LOGIC("Ipv6AddressGeneratorImpl::IsAddressAllocated(): Address Collision: "
<< Ipv6Address(addr));
return false;
return true;
}
}
return true;
return false;
}
bool