aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Networking
diff options
context:
space:
mode:
authorBaronGreenback <jimcartlidge@yahoo.co.uk>2021-03-10 13:28:18 +0000
committerBaronGreenback <jimcartlidge@yahoo.co.uk>2021-03-10 13:28:18 +0000
commit2fe26ef136fb00a59362bec33f0a4c31335a330a (patch)
tree3f8473ba66342856bfb7b3f226820145e52256ad /Jellyfin.Networking
parenta031f7e410f7b599e1a50b2c54a7bd78f4187301 (diff)
removed parameter preset
Diffstat (limited to 'Jellyfin.Networking')
-rw-r--r--Jellyfin.Networking/Manager/NetworkManager.cs16
1 files changed, 7 insertions, 9 deletions
diff --git a/Jellyfin.Networking/Manager/NetworkManager.cs b/Jellyfin.Networking/Manager/NetworkManager.cs
index 17bbf9633..bf121737b 100644
--- a/Jellyfin.Networking/Manager/NetworkManager.cs
+++ b/Jellyfin.Networking/Manager/NetworkManager.cs
@@ -157,16 +157,15 @@ namespace Jellyfin.Networking.Manager
/// Creates a new network collection.
/// </summary>
/// <param name="source">Items to assign the collection, or null.</param>
- /// <param name="unique"><c>True</c> if subnets that overlap should be merged (default).</param>
/// <returns>The collection created.</returns>
- public static Collection<IPObject> CreateCollection(IEnumerable<IPObject>? source = null, bool unique = true)
+ public static Collection<IPObject> CreateCollection(IEnumerable<IPObject>? source = null)
{
var result = new Collection<IPObject>();
if (source != null)
{
foreach (var item in source)
{
- result.AddItem(item, unique);
+ result.AddItem(item, false);
}
}
@@ -391,8 +390,7 @@ namespace Jellyfin.Networking.Manager
_interfaceAddresses
.Exclude(_bindExclusions)
.Where(IsInLocalNetwork)
- .OrderBy(p => p.Tag),
- false);
+ .OrderBy(p => p.Tag));
if (interfaces.Count > 0)
{
@@ -432,11 +430,11 @@ namespace Jellyfin.Networking.Manager
if (_bindExclusions.Count > 0)
{
// Return all the internal interfaces except the ones excluded.
- return CreateCollection(_internalInterfaces.Where(p => !_bindExclusions.ContainsAddress(p)), false);
+ return CreateCollection(_internalInterfaces.Where(p => !_bindExclusions.ContainsAddress(p)));
}
// No bind address, so return all internal interfaces.
- return CreateCollection(_internalInterfaces.Where(p => !p.IsLoopback()), false);
+ return CreateCollection(_internalInterfaces.Where(p => !p.IsLoopback()));
}
return new Collection<IPObject>(_bindAddresses);
@@ -980,7 +978,7 @@ namespace Jellyfin.Networking.Manager
{
_logger.LogDebug("Using LAN interface addresses as user provided no LAN details.");
// Internal interfaces must be private and not excluded.
- _internalInterfaces = CreateCollection(_interfaceAddresses.Where(i => IsPrivateAddressRange(i) && !_excludedSubnets.ContainsAddress(i)), false);
+ _internalInterfaces = CreateCollection(_interfaceAddresses.Where(i => IsPrivateAddressRange(i) && !_excludedSubnets.ContainsAddress(i)));
// Subnets are the same as the calculated internal interface.
_lanSubnets = new Collection<IPObject>();
@@ -1015,7 +1013,7 @@ namespace Jellyfin.Networking.Manager
}
// Internal interfaces must be private, not excluded and part of the LocalNetworkSubnet.
- _internalInterfaces = CreateCollection(_interfaceAddresses.Where(i => IsInLocalNetwork(i)), false);
+ _internalInterfaces = CreateCollection(_interfaceAddresses.Where(i => IsInLocalNetwork(i)));
}
_logger.LogInformation("Defined LAN addresses : {0}", _lanSubnets.AsString());