From 1f70d6597cbcc1c19db446b0ea300f58690f927b Mon Sep 17 00:00:00 2001 From: Devon Bautista Date: Tue, 26 Nov 2024 15:18:39 -0700 Subject: [PATCH] fix: increase 0-pad width from 3 to 4 This is meant as a temporary solution until hostnames are figured out in SMD. See: https://github.com/OpenCHAMI/smd/issues/43 --- coresmd/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coresmd/main.go b/coresmd/main.go index 32a3b97..13c8fb0 100644 --- a/coresmd/main.go +++ b/coresmd/main.go @@ -131,7 +131,7 @@ func Handler4(req, resp *dhcpv4.DHCPv4) (*dhcpv4.DHCPv4, bool) { // Set client hostname if ifaceInfo.Type == "Node" { - resp.Options.Update(dhcpv4.OptHostName(fmt.Sprintf("nid%03d", ifaceInfo.CompNID))) + resp.Options.Update(dhcpv4.OptHostName(fmt.Sprintf("nid%04d", ifaceInfo.CompNID))) } // Set root path to this server's IP