This is triggered by a test failure in the integration_success test case on macOS locally. It turns out that macOS could have two network interfaces on the same IPv6 address.
(According to chatGPT, awdl stands for Apple Wireless Direct Link, and llw stands for Low-Latency Wi-Fi)
But their interface index (i.e. scope_id in IPv6) are different.
As Zeroconf.intf_socks uses IP address as its key, these two interfaces are merged into a single entry in the intf_socks map, and later failed the test when checking metrics["unregister-resend"].
This patch is to use Interface as the key instead to identify each interface even when they share the same IPv6 address. Also simplify the value type to be Socket instead of struct IntfSock.
This is triggered by a test failure in the
integration_success
test case on macOS locally. It turns out that macOS could have two network interfaces on the same IPv6 address.(According to chatGPT,
awdl
stands for Apple Wireless Direct Link, andllw
stands for Low-Latency Wi-Fi)But their interface index (i.e. scope_id in IPv6) are different.
As
Zeroconf.intf_socks
uses IP address as its key, these two interfaces are merged into a single entry in theintf_socks
map, and later failed the test when checkingmetrics["unregister-resend"]
.This patch is to use
Interface
as the key instead to identify each interface even when they share the same IPv6 address. Also simplify the value type to beSocket
instead ofstruct IntfSock
.