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=NvftzacD; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id E56615A0265 for ; Mon, 20 Jul 2026 06:24:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202606; t=1784521446; bh=JxZ7A1AS9zznRfqt9C8N5wndIJIl376u4seHNxV7AxA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=NvftzacDiFh4Sd6QTUUuaDTIkp9Eb0GENn6QD/Fr3UtPrS0+VysCdQ2hRcGWOHmfl ty8cwd/TVAixROYeFVOkelW7HM6rsTk3oyUp9ONuj4iQ6Vm9zbsQG/NzCt4fciXO5F p3B0aw23qLKWmp3QufrG7ydONKv7eqS7sIXtgbKcmwjENlyjS8J1tLjG0BVwNdbzvx 28lIEORwsD8GII4986ew/U3i1U6A7RZDLhKhLTNLEzo2W36ZE3YGjJPgzL/jR8QLAN ESdIqsrASS8Hmyngbj7yQ+SR1hUnRWtzb/rIgX6ym21obCyEGH6VDvdUeGhEEx1pEg fRhuuxcJmoPuQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4h3S8626zTz4w8x; Mon, 20 Jul 2026 14:24:06 +1000 (AEST) Date: Mon, 20 Jul 2026 14:23:59 +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="voKjj+kt6dGz3Jws" Content-Disposition: inline In-Reply-To: <20260717175648.879152-8-anskuma@redhat.com> Message-ID-Hash: X6C4VQQYEQELY3QXPRFNBNSLVLP7PMSI X-Message-ID-Hash: X6C4VQQYEQELY3QXPRFNBNSLVLP7PMSI 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: --voKjj+kt6dGz3Jws Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > Link: https://bugs.passt.top/show_bug.cgi?id=3D192 > Signed-off-by: Anshu Kumari > --- > v5: > - New patch: mark Client FQDN (option=A081) as concatenation-requiring = per RFC 4702 > --- > dhcp.c | 12 +++++++++--- > 1 file changed, 9 insertions(+), 3 deletions(-) >=20 > 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 concatenation */ > + 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. > + > + return false; > } > =20 > /** > --=20 > 2.54.0 >=20 --=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 --voKjj+kt6dGz3Jws Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmpdotkACgkQzQJF27ox 2Gcedg//Q9Y8cUTM9t63n6vcVN/W37Vlq+edPPtwMiPTWibsij2Yoi5tlnb/+Y61 xrRt+g7kV913NzZCdfhypweA21lsLGpi/SikbAjhYPg1z0PXf+D9NQRPFezThM1F Z9AS8xaQHXHzZ4Nzk5kueMCHiYkW2u/WVU74rxTijcggtwQ5oaUnN76i0oE9VEL9 md1wWiGXQxH7uqmnUSxKF3bmHbwJTQxVBQknF5lecAUiol4UPACWHAGE0lFoXU3I NB5cplZZleYyrPFdLj7CAL1H/yOlA6htEzcs9z7YdVcbOwmQeMHO4H9QgewaKut4 hd8BS03ggZlADmha3CewcoFErpV0QyuOioZGTwbDnApERjOtVKr+O82LG4R+nl90 sU7x67oN5THrWEtuLSkX3o0VtCTJYRqRgUEU85DYKyGWQgw6Ef+7VcCdF/60NzVb YmRbRhmf+mtCJ8XzLOC18SPPINM42/rLrMBECkXOL+S4Vms3Yrue0S54VvIDcVUr d5cLr1WC3WKAQFO07Y0vec2Ls1sbFDw2+2LQSJzbv/hgy3pnHiirOhuCIfQPGKBt EgKeBxAvHat28KuDu7QeNovYRLD5o1ebz05ISqeWC7aLquQ8+ETFqhWfT476vlbY BIOc9lR5FR1LyvrvNkXTe5PiFloEkeChlmlD9hocvccksXrbxiU= =/yMh -----END PGP SIGNATURE----- --voKjj+kt6dGz3Jws--