|
|
@ -1047,9 +1047,7 @@ namespace Jellyfin.Networking.Manager
|
|
|
|
// populate interface address list
|
|
|
|
// populate interface address list
|
|
|
|
foreach (UnicastIPAddressInformation info in ipProperties.UnicastAddresses)
|
|
|
|
foreach (UnicastIPAddressInformation info in ipProperties.UnicastAddresses)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (info.Address.AddressFamily == AddressFamily.InterNetwork)
|
|
|
|
if (IsIP4Enabled && info.Address.AddressFamily == AddressFamily.InterNetwork)
|
|
|
|
{
|
|
|
|
|
|
|
|
if (IsIP4Enabled)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
IPNetAddress nw = new IPNetAddress(info.Address, IPObject.MaskToCidr(info.IPv4Mask))
|
|
|
|
IPNetAddress nw = new IPNetAddress(info.Address, IPObject.MaskToCidr(info.IPv4Mask))
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1070,10 +1068,7 @@ namespace Jellyfin.Networking.Manager
|
|
|
|
_interfaceNames[adapter.Description.ToLower(CultureInfo.InvariantCulture)] = tag;
|
|
|
|
_interfaceNames[adapter.Description.ToLower(CultureInfo.InvariantCulture)] = tag;
|
|
|
|
_interfaceNames["eth" + tag.ToString(CultureInfo.InvariantCulture)] = tag;
|
|
|
|
_interfaceNames["eth" + tag.ToString(CultureInfo.InvariantCulture)] = tag;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (IsIP6Enabled && info.Address.AddressFamily == AddressFamily.InterNetworkV6)
|
|
|
|
else if (info.Address.AddressFamily == AddressFamily.InterNetworkV6)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (IsIP6Enabled)
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
IPNetAddress nw = new IPNetAddress(info.Address, (byte)info.PrefixLength)
|
|
|
|
IPNetAddress nw = new IPNetAddress(info.Address, (byte)info.PrefixLength)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1096,7 +1091,6 @@ namespace Jellyfin.Networking.Manager
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#pragma warning disable CA1031 // Do not catch general exception types
|
|
|
|
#pragma warning disable CA1031 // Do not catch general exception types
|
|
|
|
catch (Exception ex)
|
|
|
|
catch (Exception ex)
|
|
|
|
{
|
|
|
|
{
|
|
|
|