Browse Source

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]>
Anton Tolchanov 1 year ago
parent
commit
ee976ad704
1 changed files with 1 additions and 1 deletions
  1. 1 1
      posture/hwaddr.go

+ 1 - 1
posture/hwaddr.go

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