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=KaF5ZwF3; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id CD1DD5A0262 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=+kYDjlof+d3/YLH7T++EkbUVhl/2OTP3CXMzIhuDdXo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KaF5ZwF3ZW3DT8odjdnHvuT9fwEKuY1eKPYqSndeGdXRaVgbQ/JLI2lyc8jkUrzyz fmqkO64qkEVimFt16phC4nrKTZFn36Y4kqUAeqypfU9u2R8ZeOOvdHaA+Mr0EAgT6j 4MX3YSrbehZXF28hwOithjG2ibl6R/Cix6/gqSuDOv3nwrpVhbs0zdr0OkZBsqXx1G Z/2RmNU4/PlOK067XJEuNPMHYJHgk4JhmH5kO94gFOZ4H3Hc5XYrPpJym8iTbYMrv6 bzps5KaijOdvRfP7jG0KBgPqWyRqmA4c72QsBHz/idpmZNddeUBRLfGeG12VCQroGR uNlst7FH0mJgg== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4h3S861rgKz4w26; Mon, 20 Jul 2026 14:24:06 +1000 (AEST) Date: Mon, 20 Jul 2026 14:06:49 +1000 From: David Gibson To: Anshu Kumari Subject: Re: [PATCH v5 5/7] dhcp: Add --dhcp-boot command-line option Message-ID: References: <20260717175648.879152-1-anskuma@redhat.com> <20260717175648.879152-6-anskuma@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="cO813gyt7++1gbRN" Content-Disposition: inline In-Reply-To: <20260717175648.879152-6-anskuma@redhat.com> Message-ID-Hash: ZKGPHNP2OOUU5SDNLEYK7L5DWNJFQBWT X-Message-ID-Hash: ZKGPHNP2OOUU5SDNLEYK7L5DWNJFQBWT 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: --cO813gyt7++1gbRN Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 17, 2026 at 11:26:42PM +0530, Anshu Kumari wrote: > Add a convenience shorthand --dhcp-boot FILE that sets the boot file > name (DHCP option 67) for network boot. This is equivalent to > --dhcp-opt 67,FILE. >=20 > Link: https://bugs.passt.top/show_bug.cgi?id=3D192 > Signed-off-by: Anshu Kumari Reviewed-by: David Gibson > --- > v5: > - replaced conf_dhcp_option() to dhcp_set_opt(). >=20 > v4: > - Changed argument name from URL to FILE in usage and man page. > - Fixed UEFI HTTP boot wording in man page >=20 > v3: > - case 32 now calls dhcp_add_option(c, 67, optarg). > - Handles duplicate codes: --dhcp-boot and --dhcp-opt 67 coexist > correctly, last value wins. >=20 > v2: > - Removed separate dhcp_boot[PATH_MAX] field =E2=80=94 --dhcp-boot foo = now stores into custom_opts[] as code 67 (same as --dhcp-opt 67,foo) >=20 > --- > conf.c | 5 +++++ > passt.1 | 7 +++++++ > 2 files changed, 12 insertions(+) >=20 > diff --git a/conf.c b/conf.c > index e7f3ea0..eccf1c0 100644 > --- a/conf.c > +++ b/conf.c > @@ -617,6 +617,7 @@ static void usage(const char *name, FILE *f, int stat= us) > " a single, empty option disables the DNS search list\n" > " -H, --hostname NAME Hostname to configure client with\n" > " --fqdn NAME FQDN to configure client with\n" > + " --dhcp-boot FILE Boot file name for network boot\n" > " --dhcp-opt CODE,VAL Set DHCP option CODE to VAL\n"); > if (strstr(name, "pasta")) > FPRINTF(f, " default: don't use any search list\n"); > @@ -1321,6 +1322,7 @@ void conf(struct ctx *c, int argc, char **argv) > {"stats", required_argument, NULL, 31 }, > {"conf-path", required_argument, NULL, 'c' }, > {"chroot-fallback", no_argument, NULL, 32 }, > + {"dhcp-boot", required_argument, NULL, 33 }, > {"dhcp-opt", required_argument, NULL, 34 }, > { 0 }, > }; > @@ -1566,6 +1568,9 @@ void conf(struct ctx *c, int argc, char **argv) > case 32: > c->chroot_fallback =3D true; > break; > + case 33: > + dhcp_set_opt(67, optarg); > + break; > case 34: > comma =3D strchr(optarg, ','); > if (!comma) > diff --git a/passt.1 b/passt.1 > index 215a289..bfc2111 100644 > --- a/passt.1 > +++ b/passt.1 > @@ -440,6 +440,13 @@ Send \fIname\fR as DHCP option 12 (hostname). > FQDN to configure the client with. > Send \fIname\fR as Client FQDN: DHCP option 81 and DHCPv6 option 39. > =20 > +.TP > +.BR \-\-dhcp-boot " " \fIfile > +Convenience shorthand for \fB\-\-dhcp-opt\fR 67,\fIfile\fR. > +Sets the boot file name (DHCP option 67) for network boot. > +For UEFI HTTP boot, the vendor class identifier also needs to be set usi= ng > +\fB\-\-dhcp-opt\fR 60,HTTPClient. > + > .TP > .BR \-\-dhcp-opt " " \fICODE\fR,\fIVALUE\fR > Set DHCP option \fICODE\fR (1\-254) to \fIVALUE\fR. The value format dep= ends > --=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 --cO813gyt7++1gbRN Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmpdntAACgkQzQJF27ox 2Gc45Q/8CcTHqVk4a+L6pluwmIAXoGVC7oSKMr4dbLxcDOZuLSvKMOpvknG0F8uZ mH6KUAsjOGa8Gyv5elVCCAwMx9e4AoFpbrEH4i9mKzx5kCvpYSHMsOkWGlaqFTIj 9xTlDXJUkP2DICALTHq8v13KGzMmBIrQWoIfKwvxPJEGqAukG4li4XD/0s9rfx3E lZv24VC6cTjsQ/C/5XJjzbTdWfOm6JlbWz/CJBOMYKT7hrieoeQYfSI3/cWHdyMu Ymnzj+KmUtayYfgRgPLeqd3cJTYhjZSNva+uIG4PPBIq94qbmIHuILKACmoZ32g7 gm+ONqSGr4Fo4ZQgyV6wNUkuTTxKC+G2rRGkFrzoIPC5SICBLySKVz9HG1cc95/B n2z2VIjjvRg+3xn2SbZ54Iwdd++ypKr9dblpTno6d2OVbOma7viSMEhJXfoNqW14 5sIIjodklcQqPGJXxqEHdbFMo8wIJb37xM8JaMw+vN+QgoCbL6XC0PVcVhGgiCp8 q+mBs0aj+mq5FgaLGSSSHbtpGKRfyPxkK/5X/o/h1rE3fP0g7rn6P69pQAN/vb5s kN8ST0j1uBg1I7lQ9IihYujcyhEXbVbP+mf5uVgcZyuamNL1+8fXPlEGwhCUemHv B5Um8ZQabduo46b+WHAE21R0hs77YAKE+EwDfhSxeThHy1k/hY0= =XcEh -----END PGP SIGNATURE----- --cO813gyt7++1gbRN--