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=202602 header.b=K8cWzaJO; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 7DA7B5A026E for ; Wed, 27 May 2026 05:26:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202602; t=1779852384; bh=Bw4bvRSBlET6EJFvOf+dT3Eu5y20BJLAnCotYVgfzPI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=K8cWzaJOKA+erUt+w4AmStNMzVIFqM+/A+OIdikAYt2mvfzdhxbz4Jsq6Bd8aj+A6 J0pPzZA/aJW79FVkQCwbaRuAel53PKQ9d9h4WCt8X4S3HobyX8m43yi4/x81CcA7rR PGltnDrCOvXrohecF//Ui1catGpDN7cqIZLCpVSiBYvSi9ciociAfk/HMW4/3QACHu IE9baKw9OMcpVJY+c7FZSKMd+tkuuroeDGfKIrK1O5TWm6FZk1+v2Q+hS/8TpH+OSo R38RMR7m2i+2u6JmFju6dDsREUz4koxcr+E6wQ8LTw4NhQ0QLo9PLG3vRDikOYMKPk rOTceKG6RKe7w== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4gQFQS07nqz4w9Z; Wed, 27 May 2026 13:26:24 +1000 (AEST) Date: Wed, 27 May 2026 12:52:26 +1000 From: David Gibson To: Anshu Kumari Subject: Re: [PATCH v2 2/6] conf: Add --dhcp-boot command-line option Message-ID: References: <20260526123115.1226166-1-anskuma@redhat.com> <20260526123115.1226166-3-anskuma@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="QQifdr5Wyixg52aq" Content-Disposition: inline In-Reply-To: <20260526123115.1226166-3-anskuma@redhat.com> Message-ID-Hash: XLE5QHBTYPLVH4WJ3XTPL4EA7SD7YNG3 X-Message-ID-Hash: XLE5QHBTYPLVH4WJ3XTPL4EA7SD7YNG3 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: passt-dev@passt.top, sbrivio@redhat.com, jmaloy@redhat.com, lvivier@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: --QQifdr5Wyixg52aq Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 26, 2026 at 06:01:09PM +0530, Anshu Kumari wrote: > Introduce the --dhcp-boot flag that sets the boot file URL for > network boot specially for ipxe. This patch adds the option > storage and CLI parsing. >=20 > Link: https://bugs.passt.top/show_bug.cgi?id=3D192 > Signed-off-by: Anshu Kumari > --- > 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 | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) >=20 > diff --git a/conf.c b/conf.c > index 89d2127..ae8ee26 100644 > --- a/conf.c > +++ b/conf.c > @@ -618,6 +618,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 URL Boot file URL for network boot\n" > " --dhcp-opt CODE,VAL Set DHCP option by code\n"); > if (strstr(name, "pasta")) > FPRINTF(f, " default: don't use any search list\n"); > @@ -1239,6 +1240,7 @@ void conf(struct ctx *c, int argc, char **argv) > {"migrate-no-linger", no_argument, NULL, 30 }, > {"stats", required_argument, NULL, 31 }, > {"conf-path", required_argument, NULL, 'c' }, > + {"dhcp-boot", required_argument, NULL, 32 }, > {"dhcp-opt", required_argument, NULL, 33 }, > { 0 }, > }; > @@ -1475,6 +1477,18 @@ void conf(struct ctx *c, int argc, char **argv) > die("Can't display statistics if not running in foreground"); > c->stats =3D strtol(optarg, NULL, 0); > break; > + case 32: > + if (c->custom_opts_count >=3D MAX_CUSTOM_DHCP_OPTS) > + die("Too many DHCP options (max %d)", > + MAX_CUSTOM_DHCP_OPTS); > + > + c->custom_opts[c->custom_opts_count].code =3D 67; Similar to my query with --dhcp-opt, what happens if the user specifies both --dhcp-boot and --dhcp-opt 67,XXX? > + if (snprintf_check(c->custom_opts[c->custom_opts_count].str, > + sizeof(c->custom_opts[0].str), > + "%s", optarg)) > + die("Boot file name too long: %s", optarg); > + c->custom_opts_count++; > + break; > case 33: > comma =3D strchr(optarg, ','); > if (!comma) > --=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 --QQifdr5Wyixg52aq Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmoWXGkACgkQzQJF27ox 2Gf86w/+KD0AOz4S709WEakSd6pEB8naqkY0JZtZpZYxItj1fQWea4FlTZUirKaj 2gzcHS5ENesV3yr0AafurCd/VvDGNXm4oCTJVe75MvcVWlBq1DQFR3nZpIag6n7L ii7alo++zMqmEyZVAAaO0nt82KsYpUi2MTEZ2FXhtFo1OgiGax30vFDGBcFZwmSx KPjpJH/kxOV7rezbdsyt1dt1VwbI0SltckVA/FgSLmLNXUn9kmb1AfvCiuZJKkP6 B+n9IU4OO5M+GWVF9VgeTn/TMDWkFONsCYr0aRFBfCGuGUARhH/dD/u+kYMkfxJP Gq6once6Z2eOIB5eYp3Cd5he4sZxxCrSQidR0ckxkzW/rl1W/AD21Dd1Ypau4W8B +SQrNSN+qVx82Ms6BZYMqnY9Rtzt+pg2ffQQ7ry+EDc603Og815FTgSrCFiz0pUW ZFtXiunjKu8zaW5wEA6k04qtEg7abP2ugFXmt4cqMZ8EHtkBzl6/Z7SrgbtF69HT DLhIoKDXydQY+XM7VBIDbJi32+Tzu8EYvf8XG6Wrxrt1BH/9oPDfD/s9W3eXCJCQ g4C+m1ThBXJjDkIY0Qr6sZIwV2KKH352S6WHRuedWojtOOIY9TYEHsutbgNus4Or xt3Yu12mbgcQdxRZyHf1taRxT9dlY3fGOrqQjI/4EWV47YHc9G4= =Rmwc -----END PGP SIGNATURE----- --QQifdr5Wyixg52aq--