update components
This commit is contained in:
parent
904175ce26
commit
252dde1722
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user