File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -44,15 +44,14 @@ namespace {
44
44
45
45
AvahiProtocol ToAvahiProtocol (chip::Inet::IPAddressType addressType)
46
46
{
47
+ #if INET_CONFIG_ENABLE_IPV4
47
48
AvahiProtocol protocol;
48
49
49
50
switch (addressType)
50
51
{
51
- #if INET_CONFIG_ENABLE_IPV4
52
52
case chip::Inet::IPAddressType::kIPv4 :
53
53
protocol = AVAHI_PROTO_INET;
54
54
break ;
55
- #endif
56
55
case chip::Inet::IPAddressType::kIPv6 :
57
56
protocol = AVAHI_PROTO_INET6;
58
57
break ;
@@ -62,6 +61,11 @@ AvahiProtocol ToAvahiProtocol(chip::Inet::IPAddressType addressType)
62
61
}
63
62
64
63
return protocol;
64
+ #else
65
+ // We only support IPV6, never tell AVAHI about INET4 or UNSPEC because
66
+ // UNSPEC may actually return IPv4 data.
67
+ return AVAHI_PROTO_INET6;
68
+ #endif
65
69
}
66
70
67
71
chip::Inet::IPAddressType ToAddressType (AvahiProtocol protocol)
You can’t perform that action at this time.
0 commit comments