On 25/05/2017 20:48, Floris Bos wrote:
> I am pretty sure it didn't send any additional DHCP packets itself in the 
> past.

Looks like it is the other way around.
I am using an older version of FreeBSD and it does send those packates because I
see them with Wireshark.

> And code seems to reflect that.
> It copies the cached packet from the initial PXE client to a variable
> bootp_response here:
> https://github.com/freebsd/freebsd/blob/master/sys/boot/i386/libi386/pxe.c#L231

In the FreeBSD that I use this code path is always taken:

        if (rootip.s_addr == 0) {
                 * Do a bootp/dhcp request to find out where our
                 * NFS/TFTP server is.  Even if we dont get back
                 * the proper information, fall back to the server
                 * which brought us to life and a default rootpath.
                bootp(pxe_sock, BOOTP_PXE);

The code does retrieve the cached information, but performs DHCP discovery
anyway and uses the cached information only as a fallback if the discovery fail.

That actually made sense as the DHCP sever could be configured to provide
different information depending on the PXE client.  That's how my environment is
setup: dnsmasq offers a menu of boot options (via pxe-service + pxe-prompt) to a
client that's built into network cards, but provides root-path, etc, to pxeboot.

Thank you for pointing me to the new code.

Andriy Gapon

Dnsmasq-discuss mailing list

Reply via email to