From f0ecdb41bc5cc6a7fc00277711d92023617e2e7b Mon Sep 17 00:00:00 2001 From: Jonas Braathen Date: Mon, 2 Nov 2026 01:31:03 +0100 Subject: [PATCH] fix(pxe): pad IP-based PXE filenames to 8 hex digits --- mdb/pxe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mdb/pxe.py b/mdb/pxe.py index a7e2f69..c51843b 100644 --- a/mdb/pxe.py +++ b/mdb/pxe.py @@ -36,7 +36,7 @@ def get_pxe_filename(interface, filename_format="mac_addr"): Mac or IP address based PXE filename Ref: http://www.syslinux.org/wiki/index.php/PXELINUX#Examples """ - ip_addr_in_hex = f"{int(ipaddress.IPv4Address(interface.ip4address.address)):02X}" + ip_addr_in_hex = f"{int(ipaddress.IPv4Address(interface.ip4address.address)):08X}" formats = { "ip_addr": ip_addr_in_hex, "mac_addr": "01-{}".format(interface.macaddr.lower().replace(":", "-")),