diff options
| author | Shadowghost <Ghost_of_Stone@web.de> | 2022-07-19 21:28:04 +0200 |
|---|---|---|
| committer | Shadowghost <Ghost_of_Stone@web.de> | 2022-07-19 21:28:04 +0200 |
| commit | 066db8ac7fcece0ab3420b6b6c03e420d22c7306 (patch) | |
| tree | f23311480feff1053dc990930303ed10fcd01944 /RSSDP/SsdpDevicePublisher.cs | |
| parent | c2902dd1081acd96cf34682ec8a4812ab6146044 (diff) | |
Migrate NetworkManager and Tests to native .NET IP objects
Diffstat (limited to 'RSSDP/SsdpDevicePublisher.cs')
| -rw-r--r-- | RSSDP/SsdpDevicePublisher.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/RSSDP/SsdpDevicePublisher.cs b/RSSDP/SsdpDevicePublisher.cs index a7767b3c0..37c4128ba 100644 --- a/RSSDP/SsdpDevicePublisher.cs +++ b/RSSDP/SsdpDevicePublisher.cs @@ -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); } |
