public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Anshu Kumari <anskuma@redhat.com>
Cc: sbrivio@redhat.com, passt-dev@passt.top, lvivier@redhat.com,
	jmaloy@redhat.com
Subject: Re: [PATCH v5 7/7] dhcp: Handle FQDN option with RFC 3396 concatenation
Date: Tue, 21 Jul 2026 10:34:41 +1000	[thread overview]
Message-ID: <al6-km3UHkTN7iOh@zatzit> (raw)
In-Reply-To: <CADJNnVJDbDksx5Ky=MMP_SfbMvjj4fi7SY65kDv-p_Wp3h=sbA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2715 bytes --]

On Mon, Jul 20, 2026 at 01:08:56PM +0530, Anshu Kumari wrote:
> On Mon, Jul 20, 2026 at 9:54 AM David Gibson <david@gibson.dropbear.id.au>
> wrote:
> 
> > 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.
> > >
> > > Link: https://bugs.passt.top/show_bug.cgi?id=192
> > > Signed-off-by: Anshu Kumari <anskuma@redhat.com>
> > > ---
> > > v5:
> > >   - New patch: mark Client FQDN (option 81) as concatenation-requiring
> > per RFC 4702
> > > ---
> > >  dhcp.c | 12 +++++++++---
> > >  1 file changed, 9 insertions(+), 3 deletions(-)
> > >
> > > 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 >= ARRAY_SIZE(dhcp_opt_types))
> > > -             return false;
> > > -     return dhcp_opt_types[o] == DHCP_OPT_STR_CONCAT;
> > > +     if ((size_t)o < ARRAY_SIZE(dhcp_opt_types) &&
> > > +         dhcp_opt_types[o] == DHCP_OPT_STR_CONCAT)
> > > +             return true;
> > > +
> > > +     /* RFC 4702, Section 2: Client FQDN option requires concatenation
> > */
> > > +     if (o == 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.
> >
> > As option 81 is internally supported inside passt, that's why I have not
> included inside table

Ah, sorry, I missed that.

> as parsing option 81 has a special format of 3 flag bytes + DNS-encoded
> domain name.
> 
> Special condition is mentioned for option 81 in  is_concat_opt() function
> because FQDN length can exceeds
> 255 bytes for a very long domain name. Without this condition, such FQDN
> are dropped in current approach.
> With this condition, they are split across DHCP fields per RFC 3396.

I see.

To me this seems like another argument for putting the "is_concat"
flag separately from the data type.  If you can do that, you can
define option 81 as "is_concat" in the table, while still having type
NONE, so it can't be user overwritten.

-- 
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 --]

      reply	other threads:[~2026-07-21  0:38 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-17 17:56 [PATCH v5 0/7] Add --dhcp-boot and --dhcp-opt options Anshu Kumari
2026-07-17 17:56 ` [PATCH v5 1/7] dhcp: Refactor fill_one() to operate on a generic buffer Anshu Kumari
2026-07-20  1:18   ` David Gibson
2026-07-17 17:56 ` [PATCH v5 2/7] dhcp: Add option state management with enum opt_state Anshu Kumari
2026-07-20  1:36   ` David Gibson
2026-07-17 17:56 ` [PATCH v5 3/7] dhcp: Add option overload Anshu Kumari
2026-07-20  2:03   ` David Gibson
2026-07-17 17:56 ` [PATCH v5 4/7] dhcp: Add --dhcp-opt with option table and value parser Anshu Kumari
2026-07-20  3:58   ` David Gibson
2026-07-17 17:56 ` [PATCH v5 5/7] dhcp: Add --dhcp-boot command-line option Anshu Kumari
2026-07-20  4:06   ` David Gibson
2026-07-17 17:56 ` [PATCH v5 6/7] dhcp: Add RFC 3396 option splitting for concatenation-requiring options Anshu Kumari
2026-07-20  4:21   ` David Gibson
2026-07-20  9:14     ` Anshu Kumari
2026-07-17 17:56 ` [PATCH v5 7/7] dhcp: Handle FQDN option with RFC 3396 concatenation Anshu Kumari
2026-07-20  4:23   ` David Gibson
2026-07-20  7:38     ` Anshu Kumari
2026-07-21  0:34       ` 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=al6-km3UHkTN7iOh@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).