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 <[email protected]>
This commit is contained in:
Anton Tolchanov authored and Anton Tolchanov committed 2024-08-16 16:22:19 +01:00
1 parent 5cbbb48c2e
commit ee976ad704
1 file changed
+1 -1
+1 -1
View File
@@ -22,5 +22,5 @@ func GetHardwareAddrs() (hwaddrs []string, err error) {
}
})
slices.Sort(hwaddrs)
return
return slices.Compact(hwaddrs), err
}