update components

This commit is contained in:
Luke Pulverenti 2015-11-18 21:35:08 -05:00
parent 904175ce26
commit 252dde1722
2 changed files with 10 additions and 10 deletions

View File

@ -84,16 +84,16 @@ namespace MediaBrowser.Common.Implementations.Networking
return true; return true;
} }
private bool IsInPrivateAddressSpaceIpv6(string endpoint) private bool IsInPrivateAddressSpace(string endpoint)
{ {
return if (string.Equals(endpoint, "::1", StringComparison.OrdinalIgnoreCase))
{
return true;
}
// If url was requested with computer name, we may see this // Handle ipv4 mapped to ipv6
string.Equals(endpoint, "::1", StringComparison.OrdinalIgnoreCase); endpoint = endpoint.Replace("::ffff:", string.Empty);
}
private bool IsInPrivateAddressSpaceIpv4(string endpoint)
{
// Private address space: // Private address space:
// http://en.wikipedia.org/wiki/Private_network // http://en.wikipedia.org/wiki/Private_network
@ -145,7 +145,7 @@ namespace MediaBrowser.Common.Implementations.Networking
if (address.AddressFamily == AddressFamily.InterNetwork) if (address.AddressFamily == AddressFamily.InterNetwork)
{ {
lengthMatch = 4; lengthMatch = 4;
if (IsInPrivateAddressSpaceIpv4(addressString)) if (IsInPrivateAddressSpace(addressString))
{ {
return true; return true;
} }
@ -153,7 +153,7 @@ namespace MediaBrowser.Common.Implementations.Networking
else if (address.AddressFamily == AddressFamily.InterNetworkV6) else if (address.AddressFamily == AddressFamily.InterNetworkV6)
{ {
lengthMatch = 10; lengthMatch = 10;
if (IsInPrivateAddressSpaceIpv6(endpoint)) if (IsInPrivateAddressSpace(endpoint))
{ {
return true; return true;
} }

View File

@ -140,7 +140,7 @@ namespace MediaBrowser.ServerApplication
if (!duplicate.WaitForExit(10000)) if (!duplicate.WaitForExit(10000))
{ {
_logger.Info("The duplicate process did not exit."); _logger.Info("The duplicate process did not exit.");
//return true; return true;
} }
} }