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>
pull/12505/head
Anton Tolchanov 3 months ago committed by Anton Tolchanov
parent 5cbbb48c2e
commit ee976ad704

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

Loading…
Cancel
Save