Skip to content

Commit

Permalink
DiscoveryImplPlatform: Only publish IPv6 address if IPv4 is disabled (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
rojer authored Sep 22, 2023
1 parent fa181b2 commit 162ea95
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib/dnssd/Discovery_ImplPlatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,11 @@ CHIP_ERROR DiscoveryImplPlatform::PublishService(const char * serviceType, TextE
? MakeInstanceName(service.mName, sizeof(service.mName), peerId)
: GetCommissionableInstanceName(service.mName, sizeof(service.mName)));
Platform::CopyString(service.mType, serviceType);
service.mAddressType = Inet::IPAddressType::kAny;
#if INET_CONFIG_ENABLE_IPV4
service.mAddressType = Inet::IPAddressType::kAny;
#else
service.mAddressType = Inet::IPAddressType::kIPv6;
#endif
service.mInterface = interfaceId;
service.mProtocol = protocol;
service.mPort = port;
Expand Down

0 comments on commit 162ea95

Please sign in to comment.