From: Stefano Brivio <sbrivio@redhat.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: Anshu Kumari <anskuma@redhat.com>,
passt-dev@passt.top, lvivier@redhat.com, jmaloy@redhat.com
Subject: Re: [PATCH v2 2/2] dhcpv6: Inject custom options into DHCPv6 replies
Date: Wed, 01 Jul 2026 19:00:11 +0200 (CEST) [thread overview]
Message-ID: <20260701190011.0247be2b@elisabeth> (raw)
In-Reply-To: <ajS_fiydRpXWZWnI@zatzit>
On Fri, 19 Jun 2026 14:03:10 +1000
David Gibson <david@gibson.dropbear.id.au> wrote:
> On Thu, Jun 18, 2026 at 05:35:29PM +0530, Anshu Kumari wrote:
> > Append user-specified options from --dhcpv6-opt to DHCPv6 reply
> > messages. Options are parsed from the stored string value at reply
> > time using dhcpv6_opt_parse(), and skipped with a debug message if
> > they exceed the available space.
> >
> > Link: https://bugs.passt.top/show_bug.cgi?id=192
> > Signed-off-by: Anshu Kumari <anskuma@redhat.com>
> > ---
> > v2:
> > - Updated dhcpv6_custom_opts_fill() to parse str at reply time
> > using dhcpv6_opt_parse() instead of copying cached val/len.
>
> As with DHCPv4, it's not that I'm against storing the parsed values
> persistently, just that I'm against storing them twice.
With this revision, they're not stored, but still parsed twice, and:
> The existing
> data structures for DHCPv6 are different, so maybe there's not an
> obvious place to store pre-parsed options.
...yes, I guess this is one reason, but as we only let users specify
options we have in the table, we could actually make space for that by
declaring an array of 64 KiB * 84 entries.
The highest option number we currently support is 83, and IANA only
registered up to number 150, so I would expect it to remain within a
reasonable range, and in any case only memory initialised here is
actually used / allocated.
Another bit missing would be the rendering of binary values back to
human-readable ones for conf_print() purposes. That looks like a bit
more effort.
On the other hand, one day we'll probably want to have pesto(1)
configure this stuff at runtime, and sharing binary values between
processes looks more practical than sharing configuration strings... so
I'd tend to say that it's effort we will need anyway at some point.
If it's too complicated for whatever reason, I'm fine with the current
approach as well. I'd just suggest to make enough room for all the
options we support, because that part is simple.
--
Stefano
next prev parent reply other threads:[~2026-07-01 17:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-18 12:05 [PATCH v2 0/2] dhcpv6: Add --dhcpv6-opt for custom DHCPv6 options Anshu Kumari
2026-06-18 12:05 ` [PATCH v2 1/2] dhcpv6: Add --dhcpv6-opt with option type table and value parser Anshu Kumari
2026-06-19 4:00 ` David Gibson
2026-07-01 16:59 ` Stefano Brivio
2026-06-18 12:05 ` [PATCH v2 2/2] dhcpv6: Inject custom options into DHCPv6 replies Anshu Kumari
2026-06-19 4:03 ` David Gibson
2026-07-01 17:00 ` Stefano Brivio [this message]
2026-07-01 16:59 ` Stefano Brivio
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=20260701190011.0247be2b@elisabeth \
--to=sbrivio@redhat.com \
--cc=anskuma@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=jmaloy@redhat.com \
--cc=lvivier@redhat.com \
--cc=passt-dev@passt.top \
/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).