Page MenuHomeFreeBSD

dhclient: support option 114, default-url ascii
ClosedPublic

Authored by dch on Nov 21 2019, 9:11 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 12 2024, 3:00 PM
Unknown Object (File)
Mar 12 2024, 1:04 PM
Unknown Object (File)
Mar 12 2024, 12:43 AM
Unknown Object (File)
Mar 12 2024, 12:42 AM
Unknown Object (File)
Mar 12 2024, 12:42 AM
Unknown Object (File)
Mar 12 2024, 12:42 AM
Unknown Object (File)
Mar 8 2024, 4:03 AM
Unknown Object (File)
Mar 5 2024, 9:59 PM
Subscribers

Details

Summary

This will enable further automation of HTTP UEFI boot loader support by
enabling a specific option for providing the boot URL to FreeBSD. The
114 option is already in use for undisclosed purposes at Apple, and in
common usage in the OpenCompute project for this scenario.

Documented in:

https://www.iana.org/assignments/bootp-dhcp-parameters/bootp-dhcp-parameters.xhtml
https://kb.isc.org/docs/isc-dhcp-44-manual-pages-dhcp-options
https://tools.ietf.org/html/rfc3679
https://opencomputeproject.github.io/onie/user-guide/index.html#basic-dhcp-scenario-1-specify-installer-image-url

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 27679
Build 25879: arc lint + arc unit

Event Timeline

Add option handling to lookup table

This allows a suitable DHCPD like ISC-DHCPD to string option 114,
and have the client receive in its DHCP parameters, what HTTP boot
URL was used. Ideally the kernel will know how to pass this data
through from boot time, but this is a reasonable starting point
to at least ensure the option is readable when dhclient itself
starts up.

Note that option 114 is in use for this scenario in numerous places
and is documented at IANA but not explicitly for any given purpose,
just "used at APPLE". I think this is a reasonable justification,
and other projects such as ONIE are also using it for this purpose.

lease {
  interface "igb0";
  fixed-address 172.16.1.4;
  next-server 172.16.1.1;
  filename "ipxe.pxe";
  option subnet-mask 255.255.255.0;
  option routers 172.16.1.1;
  option domain-name-servers 172.16.1.1;
  option domain-name "skunkwerks.at";
  option dhcp-lease-time 864000;
  option dhcp-message-type 5;
  option dhcp-server-identifier 172.16.1.1;
  option dhcp-class-identifier "default";
  option url "http://config/host";
  renew 2 2019/11/26 11:02:57;
  rebind 6 2019/11/30 05:02:57;
  expire 0 2019/12/1 11:02:57;
}

Hi Rebecca, Ed, this hopefully follows on from the HTTP boot work already done.
If you can suggest better reviewers please let me know. I'd like to MFC this
to stable as well if all is accepted.

Functionally, this patch simply removes an annoying error message
unknown option 0x72 and replaces it with an accepted parameter:

option url "http://your.fancy.url/here";

that is then nicely available in the usual /var/db/dhclient.leases.${IFACE}

added Mark as most recent committer in this area

I think this is fine, but can you explain the "114 option is already in use for undisclosed purposes at Apple" in more detail?

I think this is fine, but can you explain the "114 option is already in use for undisclosed purposes at Apple" in more detail?

lol yes it's mentioned in RFC & IANA docs like this:

3.2. In Use by Apple

   The following option codes are used by devices from Apple Computer.
   However, none of these option codes have been described in a
   published RFC.

   The DHC WG will endeavor to have specifications for these options
   published.
The format and meaning of this option is not described in any standards document, but is claimed to be in use by Apple Computer.

Generally people are adopting it for exactly the sort of stuff we are - enabling config urls to be passed via DHCP to the OS.

This revision is now accepted and ready to land.Nov 21 2019, 9:05 PM
This revision was automatically updated to reflect the committed changes.