diff --git a/src/platform/Linux/MdnsImpl.cpp b/src/platform/Linux/MdnsImpl.cpp index eb41783248b204..e1a303c910c975 100644 --- a/src/platform/Linux/MdnsImpl.cpp +++ b/src/platform/Linux/MdnsImpl.cpp @@ -605,8 +605,13 @@ void MdnsAvahi::HandleBrowse(AvahiServiceBrowser * browser, AvahiIfIndex interfa Platform::CopyString(service.mName, name); CopyTypeWithoutProtocol(service.mType, type); - service.mProtocol = GetProtocolInType(type); - service.mAddressType = ToAddressType(protocol); + service.mProtocol = GetProtocolInType(type); + service.mAddressType = ToAddressType(protocol); + service.mInterface = INET_NULL_INTERFACEID; + if (interface != AVAHI_IF_UNSPEC) + { + service.mInterface = static_cast(interface); + } service.mType[kMdnsTypeMaxSize] = 0; context->mServices.push_back(service); } @@ -686,6 +691,11 @@ void MdnsAvahi::HandleResolve(AvahiServiceResolver * resolver, AvahiIfIndex inte result.mProtocol = GetProtocolInType(type); result.mPort = port; result.mAddressType = ToAddressType(protocol); + result.mInterface = INET_NULL_INTERFACEID; + if (interface != AVAHI_IF_UNSPEC) + { + result.mInterface = static_cast(interface); + } Platform::CopyString(result.mHostName, host_name); // Returned value is full QName, want only host part. char * dot = strchr(result.mHostName, '.');