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 <anton@tailscale.com>
This commit is contained in:
Anton Tolchanov 2024-08-16 15:41:48 +01:00 committed by Anton Tolchanov
parent 5cbbb48c2e
commit ee976ad704

View File

@ -22,5 +22,5 @@ func GetHardwareAddrs() (hwaddrs []string, err error) {
}
})
slices.Sort(hwaddrs)
return
return slices.Compact(hwaddrs), err
}