From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202606 header.b=iwzNrlo9; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 3418F5A0265 for ; Tue, 21 Jul 2026 02:38:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202606; t=1784594306; bh=G/rBnNfIHXB4lUFa5cN/51eVeKbonUXdoqStPnW1b0U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iwzNrlo90IZ6JeAxQqfIqMBhPo7Gvh4AVmw7Jw55zASFMUq1K+3zaffraG+lps4js yLP8gNfPsomGvHA4hHLB4yN7ACmMNfYPibCjzTASqxuc65RukRLlEU96KaRiBQYpy5 WrpUtxk8WX5zovQV09k4EFDXoUcHcz9YucYXhoUByP0LcbZwaty2qXD2QW37V8LjUh BkbLoBBbW/dlAnEP4SjSMC01zfHNkZUlMIhQcModMkaH2w04ecC9OhsG8tBQAzQHVY dS86Je6cvHmOHjABqpPA0TBD32gm0Bw6Ga3QQsEHrrLlsF/tATrEGHNQVFuUFoJgUy HAM/C44Up5Z+Q== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4h3z5G5xnlz4w2B; Tue, 21 Jul 2026 10:38:26 +1000 (AEST) Date: Tue, 21 Jul 2026 10:34:41 +1000 From: David Gibson To: Anshu Kumari Subject: Re: [PATCH v5 7/7] dhcp: Handle FQDN option with RFC 3396 concatenation Message-ID: References: <20260717175648.879152-1-anskuma@redhat.com> <20260717175648.879152-8-anskuma@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ETiWcnH9Pq7fyUAG" Content-Disposition: inline In-Reply-To: Message-ID-Hash: BWP25DHUCLYGKD4QIVHDZX55SMEQA23X X-Message-ID-Hash: BWP25DHUCLYGKD4QIVHDZX55SMEQA23X X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: sbrivio@redhat.com, passt-dev@passt.top, lvivier@redhat.com, jmaloy@redhat.com X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --ETiWcnH9Pq7fyUAG Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 20, 2026 at 01:08:56PM +0530, Anshu Kumari wrote: > On Mon, Jul 20, 2026 at 9:54=E2=80=AFAM David Gibson > wrote: >=20 > > On Fri, Jul 17, 2026 at 11:26:44PM +0530, Anshu Kumari wrote: > > > Mark Client FQDN (option 81) as concatenation-requiring per > > > RFC 4702, Section 2. When the encoded FQDN exceeds 255 bytes, > > > fill() now splits it across DHCP message fields using the RFC 3396 > > > splitting infrastructure instead of silently dropping it. > > > > > > Link: https://bugs.passt.top/show_bug.cgi?id=3D192 > > > Signed-off-by: Anshu Kumari > > > --- > > > v5: > > > - New patch: mark Client FQDN (option 81) as concatenation-requiring > > per RFC 4702 > > > --- > > > dhcp.c | 12 +++++++++--- > > > 1 file changed, 9 insertions(+), 3 deletions(-) > > > > > > diff --git a/dhcp.c b/dhcp.c > > > index 6bebb5f..a54ac58 100644 > > > --- a/dhcp.c > > > +++ b/dhcp.c > > > @@ -484,9 +484,15 @@ enum dhcp_overload { > > > */ > > > static bool is_concat_opt(int o) > > > { > > > - if ((size_t)o >=3D ARRAY_SIZE(dhcp_opt_types)) > > > - return false; > > > - return dhcp_opt_types[o] =3D=3D DHCP_OPT_STR_CONCAT; > > > + if ((size_t)o < ARRAY_SIZE(dhcp_opt_types) && > > > + dhcp_opt_types[o] =3D=3D DHCP_OPT_STR_CONCAT) > > > + return true; > > > + > > > + /* RFC 4702, Section 2: Client FQDN option requires concatenati= on > > */ > > > + if (o =3D=3D 81) > > > + return true; > > > > Why is this explicitly special cased, rather than setting the type in > > the table? Come to that, does this do anything, since we don't > > appear to currently allow option 81 anyway. > > > > As option 81 is internally supported inside passt, that's why I have not > included inside table Ah, sorry, I missed that. > as parsing option 81 has a special format of 3 flag bytes + DNS-encoded > domain name. >=20 > Special condition is mentioned for option 81 in is_concat_opt() function > because FQDN length can exceeds > 255 bytes for a very long domain name. Without this condition, such FQDN > are dropped in current approach. > With this condition, they are split across DHCP fields per RFC 3396. I see. To me this seems like another argument for putting the "is_concat" flag separately from the data type. If you can do that, you can define option 81 as "is_concat" in the table, while still having type NONE, so it can't be user overwritten. --=20 David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson --ETiWcnH9Pq7fyUAG Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmpevpIACgkQzQJF27ox 2GfZHxAAqnhVfDYOt7ulnzrPFfSv+fNLNfYTq1RM6g6WvIUnDF29b963P28GfT7O lgrpoNHGOnj/VA2BFGmMeF9+k3a3H+e2vtDDPooZbKFXsLq0S7+O6QLftGQtyeCj sUv6BTpc69/Jjn6vqb80vCo7xNrA4Hqst5+ZNOttexHV3dwoN/212Vh2MnKiHxDG DHnxPQy45iZeVNE9az2NHS+ylSNZEF61T/0Sw2R1wZYNVINRv3Ylu9k9zdlEALew QCgJEONPXxo6+c4zIhZty4MogHX/thmxM81i12gvqKhJhivZ4zL8sgXGT1tQ3jZ9 4rBFfOwf+UrtQssW34DgEN3OIP6Yy5nkY0PN/WyS5O4du4QwhnEFMAcE/FKB6+ax D5+CpG3fpcwD+CgSjlcrMGoFHtf7zO6JKQaCHAX8rynUtpD5pgBhYBtHi38VdIRo nG7cWPcqfhWSArBBphOf0PNIqSuzqjOJBNQd7aWYFyZQU2Js0HulA5Ryy3eIVlBX 10WzVC2f2+Xp1t3iQTpBgShqSgGDRTgnj2PZQ7m/ZvXCOMWdUsneUsCiP8PipEat n44zQ/AViusgHLJe9+fVIppG/CdzVaUHQyalkGzlo5xLDPtDw2jw+FfqUdB5jQxo eMfdyL71cPixND9kIqGrhI8qeuNwgjSKGOCvldGNN+AX20BoBBc= =YqJG -----END PGP SIGNATURE----- --ETiWcnH9Pq7fyUAG--