aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Networking/NetworkManager.cs
diff options
context:
space:
mode:
authorBaronGreenback <jimcartlidge@yahoo.co.uk>2020-07-20 16:59:04 +0100
committerBaronGreenback <jimcartlidge@yahoo.co.uk>2020-07-20 16:59:04 +0100
commitbde1a38a88150b79e624fa20c6658cc783226135 (patch)
tree5bbde20969608d95d19cfaaf5229eaa67b96a70c /Emby.Server.Implementations/Networking/NetworkManager.cs
parent46f67c9ea4f13e14d5f0b2aa30fdf0e10655c37d (diff)
Two fixes
Diffstat (limited to 'Emby.Server.Implementations/Networking/NetworkManager.cs')
-rw-r--r--Emby.Server.Implementations/Networking/NetworkManager.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/Networking/NetworkManager.cs b/Emby.Server.Implementations/Networking/NetworkManager.cs
index 6aa1dfbc9..54d0e29ed 100644
--- a/Emby.Server.Implementations/Networking/NetworkManager.cs
+++ b/Emby.Server.Implementations/Networking/NetworkManager.cs
@@ -152,6 +152,11 @@ namespace Emby.Server.Implementations.Networking
return true;
}
+ if (!IPAddress.TryParse(endpoint, out _))
+ {
+ return false;
+ }
+
byte[] octet = IPAddress.Parse(endpoint).GetAddressBytes();
if ((octet[0] == 10) ||
@@ -268,6 +273,12 @@ namespace Emby.Server.Implementations.Networking
string excludeAddress = "[" + addressString + "]";
var subnets = LocalSubnetsFn();
+ // Include any address if LAN subnets aren't specified
+ if (subnets.Length == 0)
+ {
+ return true;
+ }
+
// Exclude any addresses if they appear in the LAN list in [ ]
if (Array.IndexOf(subnets, excludeAddress) != -1)
{