This commit is contained in:
Bond-009
2023-02-14 20:08:52 +01:00
committed by GitHub
parent 48c6461945
commit 36b7157589
2 changed files with 6 additions and 0 deletions

View File

@@ -167,6 +167,11 @@ namespace MediaBrowser.Common.Net
address = address.MapToIPv4();
}
if (address.AddressFamily != AddressFamily)
{
return false;
}
var (altAddress, altPrefix) = NetworkAddressOf(address, PrefixLength);
return NetworkAddress.Address.Equals(altAddress) && NetworkAddress.PrefixLength >= altPrefix;
}