mirror of
https://github.com/danderson/netboot.git
synced 2025-10-16 18:11:21 +02:00
pixiecore: fix the unknown firmware type error in DHCP and PXE.
The error message accidentally used the retval instead of the packet's value, so always returned type 0 (x86 PC, the most universal firmware type) instead of the actual unsupported type. Signed-off-by: David Anderson <dave@natulte.net>
This commit is contained in:
parent
64f6de6d0e
commit
9e897ef112
@ -116,7 +116,7 @@ func (s *Server) validateDHCP(pkt *dhcp4.Packet) (mach Machine, fwtype Firmware,
|
||||
mach.Arch = ArchX64
|
||||
fwtype = FirmwareEFIBC
|
||||
default:
|
||||
return mach, 0, fmt.Errorf("unsupported client firmware type '%d' (please file a bug!)", fwtype)
|
||||
return mach, 0, fmt.Errorf("unsupported client firmware type '%d' (please file a bug!)", fwt)
|
||||
}
|
||||
|
||||
// Now, identify special sub-breeds of client firmware based on
|
||||
|
@ -107,7 +107,7 @@ func (s *Server) validatePXE(pkt *dhcp4.Packet) (fwtype Firmware, err error) {
|
||||
return 0, fmt.Errorf("unsupported client firmware type '%d' (please file a bug!)", fwt)
|
||||
}
|
||||
if s.Ipxe[fwtype] == nil {
|
||||
return 0, fmt.Errorf("unsupported client firmware type '%d' (please file a bug!)", fwtype)
|
||||
return 0, fmt.Errorf("unsupported client firmware type '%d' (please file a bug!)", fwt)
|
||||
}
|
||||
|
||||
guid := pkt.Options[97]
|
||||
|
Loading…
x
Reference in New Issue
Block a user