eblot / pybootd

A minimalist bootp/dhcp/pxe and tftp server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[hundle dhcp packet] extra buffer chained into the end of the return packet (after the packet end option 255).

ahmadm opened this issue · comments

extra buffer chained into the end of the DHCP return-packet (after the end option 255),
this extra buffer appears like a padding section, so client cannot recognize all the extra options.

I think DHCP_END option should be chained after the extra_buf, not before.

    *pkt += struct.pack('!BB', DHCP_END, 0)*

    if pxe:
        extra_buf = self.build_pxe_options(options, server)
        if not extra_buf:
            return
    else:
        extra_buf = self.build_dhcp_options(hostname) 

regards

You are right. Good catch, thanks.