iPXE discussion forum
iPXE malforms DHCP option 77 UserClass Option - Printable Version

+- iPXE discussion forum (https://forum.ipxe.org)
+-- Forum: iPXE user forums (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: iPXE malforms DHCP option 77 UserClass Option (/showthread.php?tid=7530)



iPXE malforms DHCP option 77 UserClass Option - mijanek - 2014-11-10 07:17

iPXE malforms DHCP option 77 (UserClass Option)


Hi all,

I'm just started to use the iPXE (really great project) on my UEFI machines (unfortunately without legacy mode) ast the UEFI PXE imlementation is buggy (on all devices I have seen so far - bootserver discovery doens't work). Anyway as I am using my own custom ProxyDHCP, in order to recognize where the Request came from, I'm goigng to use the option 77 as sugested, but it is actually malformed against RFC 3004.

The option is correctly encapsuled,
Code Len Value
+-----+-----+--------------------- . . . --+
| 77 | N | User Class Data ('Len' octets) |
+-----+-----+--------------------- . . . --+
but the content is worng..

UC_Len_i User_Class_Data_i
+--------+------------------------ . . . --+
| L_i | Opaque-Data ('UC_Len_i' octets) |
+--------+------------------------ . . . --+

What I have seen, instead to report the length (once again) it starts with ASCII "iPXE"..

Is there any "switch" or another way to get it comply with the RFC or it is intended not to do so?


Thanks a lot

Miro


RE: iPXE malforms DHCP option 77 UserClass Option - mcb30 - 2014-11-10 16:52

(2014-11-10 07:17)mijanek Wrote:  I'm just started to use the iPXE (really great project) on my UEFI machines (unfortunately without legacy mode) ast the UEFI PXE imlementation is buggy (on all devices I have seen so far - bootserver discovery doens't work). Anyway as I am using my own custom ProxyDHCP, in order to recognize where the Request came from, I'm goigng to use the option 77 as sugested, but it is actually malformed against RFC 3004.

Yes, it is malformed. For a long time, iPXE treated the user class as a simple string option, rather than the array-of-strings described in RFC3004. There is a substantial amount of documentation which suggests checking option 77 for the value "iPXE" to identify iPXE client, and using "set user-class <text>" to specify a custom user class.

To avoid breaking existing setups, iPXE will continue to provide option 77 as a string for DHCPv4.

It's probably worth noting that ISC dhcpd (the reference implementation for DHCP servers) also treats option 77 as a string. In the spirit of RFC1122's philosophy of "be liberal in what you accept, and conservative in what you send", your custom ProxyDHCP should probably be prepared to accept either form of option 77.

Michael


RE: iPXE malforms DHCP option 77 UserClass Option - mijanek - 2014-11-11 06:49

Thanks for very nice explanation, I was thinking it will be something simmilar Smile

(2014-11-10 16:52)mcb30 Wrote:  In the spirit of RFC1122's philosophy of "be liberal in what you accept, and conservative in what you send"

That's nice hint, I have overseen Rolleyes