From bedee7922f3be0cd5d1f4f687e9766c1217e39e7 Mon Sep 17 00:00:00 2001 From: Shadowghost Date: Fri, 17 Feb 2023 18:24:13 +0100 Subject: Fix interface address assignment and resolution in SSDP --- RSSDP/SsdpCommunicationsServer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'RSSDP') diff --git a/RSSDP/SsdpCommunicationsServer.cs b/RSSDP/SsdpCommunicationsServer.cs index 6ae260d557..f70a598fbe 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) -- cgit v1.2.3