mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 13:57:14 -04:00
Don't crash when IPv6 subnet in LocalNetworkSubnets (backport) (#9832)
This commit is contained in:
parent
2b98ce052e
commit
643df48707
@ -170,6 +170,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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user