diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2020-11-22 01:11:02 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-22 01:11:02 -0500 |
| commit | a57b99bffdf40067465a0dda920fab23ceda1451 (patch) | |
| tree | 003df6bc0da24bdddeefc8366120cb4d20fc6933 /RSSDP/SsdpDevicePublisher.cs | |
| parent | c1db8869f06105b13f93f15d12061ada523dbb78 (diff) | |
| parent | 2c9e355e428e1498d4dc3bce844917a1a0333284 (diff) | |
Merge pull request #4125 from BaronGreenback/NetworkPR2
Networking 2 (Cumulative PR) - Swapping over to new NetworkManager
Diffstat (limited to 'RSSDP/SsdpDevicePublisher.cs')
| -rw-r--r-- | RSSDP/SsdpDevicePublisher.cs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/RSSDP/SsdpDevicePublisher.cs b/RSSDP/SsdpDevicePublisher.cs index 90925b9e0..c9e795d56 100644 --- a/RSSDP/SsdpDevicePublisher.cs +++ b/RSSDP/SsdpDevicePublisher.cs @@ -300,17 +300,15 @@ namespace Rssdp.Infrastructure foreach (var device in deviceList) { - if (!_sendOnlyMatchedHost || - _networkManager.IsInSameSubnet(device.ToRootDevice().Address, remoteEndPoint.Address, device.ToRootDevice().SubnetMask)) + 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)) { SendDeviceSearchResponses(device, remoteEndPoint, receivedOnlocalIpAddress, cancellationToken); } } } - else - { - // WriteTrace(String.Format("Sending 0 search responses.")); - } }); } |
