From: David Gibson <david@gibson.dropbear.id.au>
To: Anshu Kumari <anskuma@redhat.com>
Cc: passt-dev@passt.top, sbrivio@redhat.com, jmaloy@redhat.com,
lvivier@redhat.com
Subject: Re: [PATCH v4 4/4] conf: Add --dhcp-boot command-line option
Date: Fri, 19 Jun 2026 13:53:54 +1000 [thread overview]
Message-ID: <ajS9Uns_Mojwe4mI@zatzit> (raw)
In-Reply-To: <20260617132243.1499556-5-anskuma@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 3156 bytes --]
On Wed, Jun 17, 2026 at 06:52:38PM +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.
>
> Link: https://bugs.passt.top/show_bug.cgi?id=192
> Signed-off-by: Anshu Kumari <anskuma@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> v4:
> - Changed argument name from URL to FILE in usage and man page.
> - Fixed UEFI HTTP boot wording in man page
>
> 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.
>
> v2:
> - Removed separate dhcp_boot[PATH_MAX] field — --dhcp-boot foo now stores into custom_opts[] as code 67 (same as --dhcp-opt 67,foo)
>
> ---
> conf.c | 5 +++++
> passt.1 | 7 +++++++
> 2 files changed, 12 insertions(+)
>
> diff --git a/conf.c b/conf.c
> index 836b297..f100e0b 100644
> --- a/conf.c
> +++ b/conf.c
> @@ -618,6 +618,7 @@ static void usage(const char *name, FILE *f, int status)
> " 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");
> @@ -1258,6 +1259,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, 33 },
> {"dhcp-opt", required_argument, NULL, 34 },
> { 0 },
> };
> @@ -1496,6 +1498,9 @@ void conf(struct ctx *c, int argc, char **argv)
> die("Can't display statistics if not running in foreground");
> c->stats = strtol(optarg, NULL, 0);
> break;
> + case 33:
> + conf_dhcp_option(c, 67, optarg);
> + break;
> case 34:
> comma = strchr(optarg, ',');
> if (!comma)
> diff --git a/passt.1 b/passt.1
> index ccdcbb2..f2341ef 100644
> --- a/passt.1
> +++ b/passt.1
> @@ -430,6 +430,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.
>
> +.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 using
> +\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 depends
> --
> 2.54.0
>
--
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2026-06-19 3:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-17 13:22 [PATCH v4 0/4] Add --dhcp-boot and --dhcp-opt options Anshu Kumari
2026-06-17 13:22 ` [PATCH v4 1/4] dhcp: Refactor fill_one() to operate on a generic buffer Anshu Kumari
2026-06-19 3:26 ` David Gibson
2026-06-17 13:22 ` [PATCH v4 2/4] dhcp: Add option overload Anshu Kumari
2026-06-19 3:39 ` David Gibson
2026-06-19 7:55 ` Anshu Kumari
2026-06-17 13:22 ` [PATCH v4 3/4] dhcp: Add --dhcp-opt with option table and value parser Anshu Kumari
2026-06-19 3:52 ` David Gibson
2026-06-19 7:29 ` Anshu Kumari
2026-06-17 13:22 ` [PATCH v4 4/4] conf: Add --dhcp-boot command-line option Anshu Kumari
2026-06-19 3:53 ` David Gibson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ajS9Uns_Mojwe4mI@zatzit \
--to=david@gibson.dropbear.id.au \
--cc=anskuma@redhat.com \
--cc=jmaloy@redhat.com \
--cc=lvivier@redhat.com \
--cc=passt-dev@passt.top \
--cc=sbrivio@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).