diff options
| author | Jim Cartlidge <jimcartlidge@yahoo.co.uk> | 2020-10-04 09:56:33 +0100 |
|---|---|---|
| committer | Jim Cartlidge <jimcartlidge@yahoo.co.uk> | 2020-10-04 09:56:33 +0100 |
| commit | 53af1e34553917d00e17465f345ea530f04beddf (patch) | |
| tree | c9ec4bbd1536da705263c71075d48bb9f226a9c7 /RSSDP | |
| parent | 3b64171cde969a7cfca60d28c7782774a173758b (diff) | |
Updatig netcollection & re-inserting BOM
Diffstat (limited to 'RSSDP')
| -rw-r--r-- | RSSDP/SsdpCommunicationsServer.cs | 2 | ||||
| -rw-r--r-- | RSSDP/SsdpDevicePublisher.cs | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/RSSDP/SsdpCommunicationsServer.cs b/RSSDP/SsdpCommunicationsServer.cs index ea9e9a6fb5..8f1f0fa613 100644 --- a/RSSDP/SsdpCommunicationsServer.cs +++ b/RSSDP/SsdpCommunicationsServer.cs @@ -352,7 +352,7 @@ namespace Rssdp.Infrastructure if (_enableMultiSocketBinding) { - foreach (var address in _networkManager.GetAllBindInterfaces()) + foreach (var address in _networkManager.GetInternalBindAddresses()) { if (address.AddressFamily == AddressFamily.InterNetworkV6) { diff --git a/RSSDP/SsdpDevicePublisher.cs b/RSSDP/SsdpDevicePublisher.cs index c70294b38e..ca382c905a 100644 --- a/RSSDP/SsdpDevicePublisher.cs +++ b/RSSDP/SsdpDevicePublisher.cs @@ -301,9 +301,10 @@ namespace Rssdp.Infrastructure foreach (var device in deviceList) { - var ip1 = new IPNetAddress(device.ToRootDevice().Address, device.ToRootDevice().SubnetMask); - var ip2 = new IPNetAddress(remoteEndPoint.Address, device.ToRootDevice().SubnetMask); - if (!_sendOnlyMatchedHost || ip1.NetworkAddress.Equals(ip2.NetworkAddress)) + var root = device.ToRootDevice(); + var source = new IPNetAddress(root.Address, root.SubnetMask); + var destination = new IPNetAddress(remoteEndPoint.Address, root.SubnetMask); + if (!_sendOnlyMatchedHost || source.NetworkAddress.Equals(destination.NetworkAddress)) { SendDeviceSearchResponses(device, remoteEndPoint, receivedOnlocalIpAddress, cancellationToken); } |
