mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-02 00:12:24 +00:00
Backport pull request #13448 from jellyfin/release-10.10.z
Fix interface ordering again
Original-merge: 731874429c
Merged-by: Bond-009 <bond.009@outlook.com>
Backported-by: Bond_009 <bond.009@outlook.com>
This commit is contained in:
@@ -1065,7 +1065,8 @@ public class NetworkManager : INetworkManager, IDisposable
|
||||
// Check to see if any of the external bind interfaces are in the same subnet as the source.
|
||||
// If none exists, this will select the first external interface if there is one.
|
||||
bindAddress = externalInterfaces
|
||||
.OrderBy(x => x.Subnet.Contains(source))
|
||||
.OrderByDescending(x => x.Subnet.Contains(source))
|
||||
.ThenByDescending(x => x.Subnet.PrefixLength)
|
||||
.ThenBy(x => x.Index)
|
||||
.Select(x => x.Address)
|
||||
.First();
|
||||
@@ -1082,7 +1083,8 @@ public class NetworkManager : INetworkManager, IDisposable
|
||||
// Check to see if any of the internal bind interfaces are in the same subnet as the source.
|
||||
// If none exists, this will select the first internal interface if there is one.
|
||||
bindAddress = _interfaces.Where(x => IsInLocalNetwork(x.Address))
|
||||
.OrderBy(x => x.Subnet.Contains(source))
|
||||
.OrderByDescending(x => x.Subnet.Contains(source))
|
||||
.ThenByDescending(x => x.Subnet.PrefixLength)
|
||||
.ThenBy(x => x.Index)
|
||||
.Select(x => x.Address)
|
||||
.FirstOrDefault();
|
||||
|
||||
Reference in New Issue
Block a user