mirror of
https://github.com/hanzoai/visor.git
synced 2026-09-24 17:04:14 +00:00
Go map iteration randomness causes network interface enumeration (getifaddrs, RTM_GETADDR, RTM_GETLINK, /proc/net/*, SIOCGIFCONF) to return nondeterministic order, breaking applications like asciidoctor that expect stable ordering across repeated calls. Since gVisor allocates NIC IDs monotonically (like Linux ifindex), sorting by NICID is equivalent to registration order. Add InterfaceIDs() to inet.Stack so all consumer paths iterate in deterministic ascending-ID order without ad-hoc sorting at each call site. Signed-off-by: Tan Yifeng <[email protected]>