From d31b53a26e9133fdc97569b99a777b6e4165cd7f Mon Sep 17 00:00:00 2001 From: Devon Bautista Date: Tue, 22 Oct 2024 22:52:52 -0600 Subject: [PATCH] fix(coresmd): always terminate packet when IP assigned --- coresmd/main.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/coresmd/main.go b/coresmd/main.go index 051098f..7432933 100644 --- a/coresmd/main.go +++ b/coresmd/main.go @@ -126,21 +126,19 @@ func Handler4(req, resp *dhcpv4.DHCPv4) (*dhcpv4.DHCPv4, bool) { } // STEP 2: Send boot config - var terminate bool if cinfo := req.Options.Get(dhcpv4.OptionUserClassInformation); string(cinfo) != "iPXE" { // BOOT STAGE 1: Send iPXE bootloader over TFTP - resp, terminate = ipxe.ServeIPXEBootloader(log, req, resp) + resp, _ = ipxe.ServeIPXEBootloader(log, req, resp) } else { // BOOT STAGE 2: Send URL to BSS boot script bssURL := bootScriptBaseURL.JoinPath("/boot/v1/bootscript") bssURL.RawQuery = fmt.Sprintf("mac=%s", hwAddr) resp.Options.Update(dhcpv4.OptBootFileName(bssURL.String())) - terminate = true } debug.DebugResponse(log, resp) - return resp, terminate + return resp, true } func lookupMAC(mac string) (IfaceInfo, error) {