From ee976ad704980e20ec36c6aaaad0a2ce5b30b3d5 Mon Sep 17 00:00:00 2001 From: Anton Tolchanov Date: Fri, 16 Aug 2024 15:41:48 +0100 Subject: [PATCH] posture: deduplicate MAC addresses before returning them Some machines have multiple network interfaces with the same MAC address. Updates tailscale/corp#21371 Signed-off-by: Anton Tolchanov --- posture/hwaddr.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/posture/hwaddr.go b/posture/hwaddr.go index a38cc5be0..dd0b6d8be 100644 --- a/posture/hwaddr.go +++ b/posture/hwaddr.go @@ -22,5 +22,5 @@ func GetHardwareAddrs() (hwaddrs []string, err error) { } }) slices.Sort(hwaddrs) - return + return slices.Compact(hwaddrs), err }