diff options
| author | Shadowghost <Ghost_of_Stone@web.de> | 2023-02-17 18:24:13 +0100 |
|---|---|---|
| committer | Shadowghost <Ghost_of_Stone@web.de> | 2023-02-17 18:24:13 +0100 |
| commit | bedee7922f3be0cd5d1f4f687e9766c1217e39e7 (patch) | |
| tree | e0a5daa21f49b15aa72b78a7fadb451520b94fb8 /RSSDP/SsdpCommunicationsServer.cs | |
| parent | 42498194d9a4069b8cdeb9446f2714f74e3169de (diff) | |
Fix interface address assignment and resolution in SSDP
Diffstat (limited to 'RSSDP/SsdpCommunicationsServer.cs')
| -rw-r--r-- | RSSDP/SsdpCommunicationsServer.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/RSSDP/SsdpCommunicationsServer.cs b/RSSDP/SsdpCommunicationsServer.cs index 6ae260d55..f70a598fb 100644 --- a/RSSDP/SsdpCommunicationsServer.cs +++ b/RSSDP/SsdpCommunicationsServer.cs @@ -428,12 +428,12 @@ namespace Rssdp.Infrastructure if (result.ReceivedBytes > 0) { var remoteEndpoint = (IPEndPoint)result.RemoteEndPoint; - var localEndpointAddress = result.PacketInformation.Address; + var localEndpointAdapter = _networkManager.GetAllBindInterfaces().Where(a => a.Index == result.PacketInformation.Interface).First(); ProcessMessage( UTF8Encoding.UTF8.GetString(receiveBuffer, 0, result.ReceivedBytes), remoteEndpoint, - localEndpointAddress); + localEndpointAdapter.Address); } } catch (ObjectDisposedException) |
