diff options
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); } |
