mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-05 22:02:53 +01:00
Migrate NetworkManager and Tests to native .NET IP objects
This commit is contained in:
@@ -7,6 +7,7 @@ using System.Net;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Common.Net;
|
||||
using Microsoft.AspNetCore.HttpOverrides;
|
||||
|
||||
namespace Rssdp.Infrastructure
|
||||
{
|
||||
@@ -297,9 +298,9 @@ namespace Rssdp.Infrastructure
|
||||
foreach (var device in deviceList)
|
||||
{
|
||||
var root = device.ToRootDevice();
|
||||
var source = new IPNetAddress(root.Address, root.PrefixLength);
|
||||
var destination = new IPNetAddress(remoteEndPoint.Address, root.PrefixLength);
|
||||
if (!_sendOnlyMatchedHost || source.NetworkAddress.Equals(destination.NetworkAddress))
|
||||
var source = new IPData(root.Address, new IPNetwork(root.Address, root.PrefixLength), root.FriendlyName);
|
||||
var destination = new IPData(remoteEndPoint.Address, new IPNetwork(root.Address, root.PrefixLength));
|
||||
if (!_sendOnlyMatchedHost || source.Address.Equals(destination.Address))
|
||||
{
|
||||
SendDeviceSearchResponses(device, remoteEndPoint, receivedOnlocalIpAddress, cancellationToken);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user