Update Emby.Server.Implementations/Networking/NetworkManager.cs

Co-authored-by: Cody Robibero <cody@robibe.ro>
This commit is contained in:
BaronGreenback 2020-07-20 17:18:50 +01:00 committed by GitHub
parent bde1a38a88
commit f983ea95d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -152,12 +152,12 @@ namespace Emby.Server.Implementations.Networking
return true;
}
if (!IPAddress.TryParse(endpoint, out _))
if (!IPAddress.TryParse(endpoint, out var ipAddress))
{
return false;
}
byte[] octet = IPAddress.Parse(endpoint).GetAddressBytes();
byte[] octet = ipAddress.GetAddressBytes();
if ((octet[0] == 10) ||
(octet[0] == 172 && (octet[1] >= 16 && octet[1] <= 31)) || // RFC1918