From nobody Wed Oct 07 14:07:42 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4j0FM33KJyz6vy1P for ; Wed, 07 Oct 2026 14:07:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4j0FM31JVPz3PJf for ; Wed, 07 Oct 2026 14:07:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1791382063; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IpDtymzhk3Ah5oNAU/xY1foAUT1ql4to5KG/9bxpqXQ=; b=RAOO37zGNjzryPx59SvdMeY++uq8mkoPN8lSAJCdf9Oqi5RLJWgEE2OPXjogynFCXdSSok 1FrtNLRuVdrTepMhn67o3uRBTsadFw6HfCMyyl1U5KjsZwtVLrM1a2ssqWhLXET63fpPfJ MbNgVLfblhcRq34GK1tQj7CdeHyZwrGDweL4W7DqUBNKDxwdz2ss7KqkQ2u4V/W97XMQ1E DoWiLdYPq7b0Lrbu2D7UllETbCXzKIbzY20FShwxdbzYOFAXq546d4fgQO2LdUaa2fq9oi bSXhw9inBWboIUQozuxvZTxuyP8he+RcNAks1DdTCGFiZnUfYhnI+OV2fhP/rQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1791382063; b=F2oyNAqKKuNUWbYMADD9l0STEQVUVXWITu4tINFz8cv58q7mgLCIezfo4KBu6q2nY3/l7g KFoZbwSzt/zDhoQ9l9d7Lr7wQnsKmpyCNJpKqkfdbcQCjn9fF1t+i0NHEgiOzzlpyVL7cE FmNXp6X+V1Iab/nTkpEpX7ewemKmS2e2lWtplkkijucN3bMcGIa/GiBlrkKQaZtfXiYMa7 8qDsGgOn5mNsmRT1zIFC+dUTM1ixeY/ZsQWuJ9A9kjpolQ0+2JvpkivXBU/98ZrVoQYBAp Ahz1QtIW1tHLqod89BFCqIDvYGlV5DeJjJcyMA3QQfDh1nVZCsvpA51lvriaqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1791382063; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IpDtymzhk3Ah5oNAU/xY1foAUT1ql4to5KG/9bxpqXQ=; b=yUK6F6vpMemX8u/n1DC/r8yRQooiGLnTCzF1JEGkQwutf4CPQHPxVR0gnfTpOnPBa2NjMd wKofegadT4z2s5WJPe7f8v/Ik77xs0Kd6YCiDjA63BWpJBKGeRZP9F1QzDvG2fDKBZv/p6 zu9TkDI02Qawv7UybJ7f9q8gAlreEfl64Prbdc1pWBRAl8+E1IoBJa2LMNEZxATLaIve79 DsuH9z6zB/svy8hrrOAOhGVJWY4fa65b5GJA9opPYl7ZuM0mvCNJ9IcTb9iCsQQBgfYoVD uDHuOdw5BnqWlSCJVHm9lRum+frUQOQ5fLdkgLnmaZ78aJ65j+VAKsTtnoza7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4j0FM306TKzx3P for ; Wed, 07 Oct 2026 14:07:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1c532 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 07 Oct 2026 14:07:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: a1789e345db7 - main - dhclient: recognize the Captive Portal DHCP options List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a1789e345db7f7c5f248006b49bb287067e03a45 Auto-Submitted: auto-generated Date: Wed, 07 Oct 2026 14:07:42 +0000 Message-Id: <6ac6522e.1c532.60bf27e6@gitrepo.freebsd.org> The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=a1789e345db7f7c5f248006b49bb287067e03a45 commit a1789e345db7f7c5f248006b49bb287067e03a45 Author: Baptiste Daroussin AuthorDate: 2026-10-02 19:53:30 +0000 Commit: Baptiste Daroussin CommitDate: 2026-10-07 14:07:08 +0000 dhclient: recognize the Captive Portal DHCP options Rename option 114 from "url" to "captive-portal" (RFC 8910) and retain "url" as a deprecated alias. Rename option 160 from the generic "option-160" to "captive-portal-legacy" (RFC 7710). Reviewed by: emaste, dch Apprived by: emaste, dch Differential Revision: https://reviews.freebsd.org/D60256 --- sbin/dhclient/dhclient.c | 3 ++- sbin/dhclient/dhcp-options.5 | 21 ++++++++++++++++----- sbin/dhclient/dhcp.h | 3 ++- sbin/dhclient/tables.c | 12 ++++++++---- 4 files changed, 28 insertions(+), 11 deletions(-) diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index e06517a06733..a9425707577c 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -2816,7 +2816,8 @@ check_option(struct client_lease *l, int option) case DHO_DHCP_CLIENT_IDENTIFIER: case DHO_BOOTFILE_NAME: case DHO_DHCP_USER_CLASS_ID: - case DHO_URL: + case DHO_CAPTIVE_PORTAL: + case DHO_CAPTIVE_PORTAL_LEGACY: case DHO_SIP_SERVERS: case DHO_V_I_VENDOR_CLASS: case DHO_V_I_VENDOR_OPTS: diff --git a/sbin/dhclient/dhcp-options.5 b/sbin/dhclient/dhcp-options.5 index db89140c1748..bc309c9b3ba3 100644 --- a/sbin/dhclient/dhcp-options.5 +++ b/sbin/dhclient/dhcp-options.5 @@ -36,7 +36,7 @@ .\" see ``http://www.isc.org/isc''. To learn more about Vixie .\" Enterprises, see ``http://www.vix.com''. .\" -.Dd January 1, 1995 +.Dd October 2, 2026 .Dt DHCP-OPTIONS 5 .Os .Sh NAME @@ -591,9 +591,20 @@ Servers should be listed in order of preference. The StreetTalk Directory Assistance (STDA) server option specifies a list of STDA servers available to the client. Servers should be listed in order of preference. -.It Ic option url Ar string ; -This option specifies the URL that the client may use when using UEFI -boot from a HTTP server. +.It Ic option captive-portal Ar string ; +This option specifies the URI of a captive portal API, as defined by +RFC 8910. +The value is a URI, usually of the form +.Dq Li https:// Ns Ar host Ns Pa /path . +A single option may contain more than one URI, separated by a space. +.Pp +The name +.Ic url +is retained as a deprecated alias. +.It Ic option captive-portal-legacy Ar string ; +This option specifies the URI of a captive portal API as defined by +RFC 7710, which used DHCP option code 160. +RFC 8910 obsoleted RFC 7710 and moved the option to code 114. .El .Sh SEE ALSO .Xr dhclient.conf 5 , @@ -602,7 +613,7 @@ boot from a HTTP server. .Xr dhclient 8 , .Xr dhcpd 8 .Rs -.%R "RFC 2131, RFC 2132, RFC 3769, RFC 8925" +.%R "RFC 2131, RFC 2132, RFC 3769, RFC 8910, RFC 8925" .Re .Sh AUTHORS .An -nosplit diff --git a/sbin/dhclient/dhcp.h b/sbin/dhclient/dhcp.h index 3b36038fce46..bdf28311dbd6 100644 --- a/sbin/dhclient/dhcp.h +++ b/sbin/dhclient/dhcp.h @@ -173,12 +173,13 @@ struct dhcp_packet { #define DHO_STREETTALK_DA_SERVER 76 #define DHO_DHCP_USER_CLASS_ID 77 #define DHO_IPV6_ONLY 108 -#define DHO_URL 114 +#define DHO_CAPTIVE_PORTAL 114 #define DHO_DOMAIN_SEARCH 119 #define DHO_SIP_SERVERS 120 #define DHO_CLASSLESS_ROUTES 121 #define DHO_V_I_VENDOR_CLASS 124 #define DHO_V_I_VENDOR_OPTS 125 +#define DHO_CAPTIVE_PORTAL_LEGACY 160 #define DHO_END 255 /* DHCP message types. */ diff --git a/sbin/dhclient/tables.c b/sbin/dhclient/tables.c index a3757ebc6b65..65c59c64727e 100644 --- a/sbin/dhclient/tables.c +++ b/sbin/dhclient/tables.c @@ -179,7 +179,7 @@ struct option dhcp_options[256] = { { "option-111", "X", &dhcp_universe, 111 }, { "option-112", "X", &dhcp_universe, 112 }, { "option-113", "X", &dhcp_universe, 113 }, - { "url", "t", &dhcp_universe, 114 }, + { "captive-portal", "t", &dhcp_universe, 114 }, { "option-115", "X", &dhcp_universe, 115 }, { "option-116", "X", &dhcp_universe, 116 }, { "option-117", "X", &dhcp_universe, 117 }, @@ -225,7 +225,7 @@ struct option dhcp_options[256] = { { "option-157", "X", &dhcp_universe, 157 }, { "option-158", "X", &dhcp_universe, 158 }, { "option-159", "X", &dhcp_universe, 159 }, - { "option-160", "X", &dhcp_universe, 160 }, + { "captive-portal-legacy", "t", &dhcp_universe, 160 }, { "option-161", "X", &dhcp_universe, 161 }, { "option-162", "X", &dhcp_universe, 162 }, { "option-163", "X", &dhcp_universe, 163 }, @@ -402,8 +402,9 @@ unsigned char dhcp_option_default_priority_list[] = { DHO_STREETTALK_DA_SERVER, DHO_DHCP_USER_CLASS_ID, DHO_DOMAIN_SEARCH, - DHO_URL, + DHO_CAPTIVE_PORTAL, DHO_IPV6_ONLY, + DHO_CAPTIVE_PORTAL_LEGACY, /* Presently-undefined options... */ 62, 63, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, @@ -412,7 +413,7 @@ unsigned char dhcp_option_default_priority_list[] = { 118, 120, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, - 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 155, 156, 157, 158, 159, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, @@ -443,6 +444,9 @@ initialize_universes(void) (const unsigned char *)dhcp_options[i].name, 0, (unsigned char *)&dhcp_options[i]); } + /* "url" is a deprecated alias for option 114. */ + add_hash(dhcp_universe.hash, (const unsigned char *)"url", 0, + (unsigned char *)&dhcp_options[DHO_CAPTIVE_PORTAL]); universe_hash.hash_count = DEFAULT_HASH_SIZE; add_hash(&universe_hash, (const unsigned char *)dhcp_universe.name, 0,