]> go.fuhry.dev Git - runtime.git/commitdiff
[machines_agent] parse mac address before posting to /api/host/seen
authorDan Fuhry <dan@fuhry.com>
Thu, 6 Nov 2025 11:56:26 +0000 (06:56 -0500)
committerDan Fuhry <dan@fuhry.com>
Sun, 9 Nov 2025 12:24:08 +0000 (07:24 -0500)
machines/machines_agent/main.go

index af9546deadc92eb08d721230d38c746f7dabbe37..69a28c8aa307e6940489e70f196718fa23e039e9 100644 (file)
@@ -80,7 +80,8 @@ func main() {
        }
 
        if *commitIPAddress != "" && *commitMACAddress != "" {
-               url := fmt.Sprintf("host/seen/%s/%s", *commitMACAddress, *commitIPAddress)
+               mac := machines.ParseMACAddress(*commitMACAddress)
+               url := fmt.Sprintf("host/seen/%s/%s", mac.Standard(), *commitIPAddress)
                host := &machines.Host{}
                ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
                defer cancel()