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 committed Sep 21, 2023
1 parent a6d21ad commit 7b48a4e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions 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);
#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 7b48a4e

Please sign in to comment.