eblot / pybootd

A minimalist bootp/dhcp/pxe and tftp server
Other
106 stars 31 forks source link

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

Closed ahmadm closed 5 years ago

ahmadm commented 9 years ago

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

eblot commented 5 years ago

You are right. Good catch, thanks.