Avoid link local IPv6 addresses

This commit is contained in:
Leon Böttger committed 2026-05-20 19:38:23 +02:00
1 parent fd29254e38
commit 238769656a
2 files changed
+7 -2

No files matched your search

@@ -17,6 +17,7 @@ struct NearbyResolvedBonjourEndpoint {
let interface: NWInterface?
let description: String
let isIPv4: Bool
let isLinkLocal: Bool
}
@@ -126,6 +127,9 @@ final class NearbyBonjourServiceResolver: NSObject, NetServiceDelegate {
if lhs.isIPv4 != rhs.isIPv4 {
return lhs.isIPv4
}
if lhs.isLinkLocal != rhs.isLinkLocal {
return !lhs.isLinkLocal
}
return lhs.description < rhs.description
}
}
@@ -185,7 +189,8 @@ final class NearbyBonjourServiceResolver: NSObject, NetServiceDelegate {
port: portRawValue,
interface: isIPv6LinkLocal ? interface : nil,
description: description,
isIPv4: addressFamily == AF_INET
isIPv4: addressFamily == AF_INET,
isLinkLocal: isIPv6LinkLocal
)
}
}
@@ -124,7 +124,7 @@
"location" : "https://github.com/siteline/swiftui-introspect",
"state" : {
"branch" : "main",
"revision" : "b789ee16f0000b35860a46a0bebca7074546d0d0"
"revision" : "c3db5696c625f8571f5f26fb292568db517374cc"
}
},
{