mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-28 10:30:57 +01:00
Print warning on invalid Subnets in Network/Proxy configuration (#16793)
Some checks failed
CodeQL / Analyze (csharp) (push) Has been cancelled
Tests / run-tests (macos-latest) (push) Has been cancelled
Tests / run-tests (ubuntu-latest) (push) Has been cancelled
Tests / run-tests (windows-latest) (push) Has been cancelled
OpenAPI Publish / OpenAPI - Publish Artifact (push) Has been cancelled
OpenAPI Publish / OpenAPI - Publish Unstable Spec (push) Has been cancelled
OpenAPI Publish / OpenAPI - Publish Stable Spec (push) Has been cancelled
Project Automation / Project board (push) Has been cancelled
Merge Conflict Labeler / Labeling (push) Has been cancelled
Some checks failed
CodeQL / Analyze (csharp) (push) Has been cancelled
Tests / run-tests (macos-latest) (push) Has been cancelled
Tests / run-tests (ubuntu-latest) (push) Has been cancelled
Tests / run-tests (windows-latest) (push) Has been cancelled
OpenAPI Publish / OpenAPI - Publish Artifact (push) Has been cancelled
OpenAPI Publish / OpenAPI - Publish Unstable Spec (push) Has been cancelled
OpenAPI Publish / OpenAPI - Publish Stable Spec (push) Has been cancelled
Project Automation / Project board (push) Has been cancelled
Merge Conflict Labeler / Labeling (push) Has been cancelled
Print warning on invalid Subnets in Network/Proxy configuration
This commit is contained in:
@@ -316,7 +316,7 @@ public class NetworkManager : INetworkManager, IDisposable
|
||||
var subnets = config.LocalNetworkSubnets;
|
||||
|
||||
// If no LAN addresses are specified, all private subnets and Loopback are deemed to be the LAN
|
||||
if (!NetworkUtils.TryParseToSubnets(subnets, out var lanSubnets, false) || lanSubnets.Count == 0)
|
||||
if (!NetworkUtils.TryParseToSubnets(subnets, out var lanSubnets, false, _logger) || lanSubnets.Count == 0)
|
||||
{
|
||||
_logger.LogDebug("Using LAN interface addresses as user provided no LAN details.");
|
||||
|
||||
@@ -343,7 +343,7 @@ public class NetworkManager : INetworkManager, IDisposable
|
||||
_lanSubnets = lanSubnets.Select(x => x.Subnet).ToArray();
|
||||
}
|
||||
|
||||
_excludedSubnets = NetworkUtils.TryParseToSubnets(subnets, out var excludedSubnets, true)
|
||||
_excludedSubnets = NetworkUtils.TryParseToSubnets(subnets, out var excludedSubnets, true, _logger)
|
||||
? excludedSubnets.Select(x => x.Subnet).ToArray()
|
||||
: Array.Empty<IPNetwork>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user