[ipxe-devel] DHCP/ProxyDHCP settings ordering bug

Alex Williamson alex.williamson at redhat.com
Thu Jun 6 22:37:38 UTC 2013


iPXE current does not behave correctly in the presence of PXE discovery
control PXEBS_SKIP, seemingly due to the ordering or the registration of
settings between normal DHCP and ProxyDHCP.  Imagine this scenario:

server1 ( - Primary DHCP


server2 ( - PXE Server

# Don't really want suboption 6, but dnsmasq adds
# it as a second suboption 6 and it gets ignored.
# Not sure how to specify nothing (not the problem).
# We don't really want pxe-prompt either, but
# without it dnsmasq won't participate (also not
# the problem).
pxe-prompt=Press [F8] to select a boot option,30

server3 ( - TFTP server

In this mode, dnsmasq on server2 adds the PXEBS_SKIP option because a
filename is specified and no pxe-service options are specified (verified
with wireshark).  The above can be made to work, but that's not the
point.  This is a dnsmasq recreation of a real problem.

The intended behavior is that server1 provides the network setup
information and server2 provides the next-server and filename for direct
booting for PXE clients.  Thus the correct boot URI is

When iPXE tries to boot in the above environment, it tries to load
tftp:// as the boot file.  The next-server comes from
server1's DHCP packet and filename comes from server2's.  Clearly this
is wrong.

>From what I can gather, this is a result of neither packet having a
priority and the ordering of adding the settings from the DHCP packet
before the ProxyDHCP packet.  list_add_tail bites us.  DHCP packets
don't support reallocation, so I can't add an artificial priority to get
them in the correct order.  Registering the settings from the ProxyDHCP
packet before the DHCP packet does work, but it's ugly and prone to
being broken by changes to the list manipulation code in settings.
Suggestions?  Thanks,


More information about the ipxe-devel mailing list