Revert "Use System.Net.IPNetwork"

This reverts commit 117d05d288da1d412159a29c0cb8d5c8259e48ae.
This commit is contained in:
Bond_009
2023-11-14 20:21:34 +01:00
parent 0fd36a5bf1
commit 635d67d458
24 changed files with 60 additions and 418 deletions

View File

@@ -279,9 +279,9 @@ namespace Jellyfin.Server.Extensions
}
else if (NetworkUtils.TryParseToSubnet(allowedProxies[i], out var subnet))
{
if (subnet.HasValue)
if (subnet is not null)
{
AddIPAddress(config, options, subnet.Value.BaseAddress, subnet.Value.PrefixLength);
AddIPAddress(config, options, subnet.Prefix, subnet.PrefixLength);
}
}
else if (NetworkUtils.TryParseHost(allowedProxies[i], out var addresses, config.EnableIPv4, config.EnableIPv6))