From: Stefano Brivio <sbrivio@redhat.com>
To: Jon Maloy <jmaloy@redhat.com>
Cc: dgibson@redhat.com, david@gibson.dropbear.id.au, passt-dev@passt.top
Subject: Re: [PATCH v11] conf: Support CIDR notation for -a/--address option
Date: Tue, 24 Feb 2026 12:56:39 +0100 (CET) [thread overview]
Message-ID: <20260224125638.7251777e@elisabeth> (raw)
In-Reply-To: <20260216205741.3648357-1-jmaloy@redhat.com>
On Mon, 16 Feb 2026 15:57:41 -0500
Jon Maloy <jmaloy@redhat.com> wrote:
> We extend the -a/--address option to accept addresses in CIDR notation
> (e.g., 192.168.1.1/24 or 2001:db8::1/64) as an alternative to using
> separate -a and -n options.
>
> We add a new inany_prefix_pton() helper function that:
> - Parses address strings with a compulsory /prefix_len suffix
> - Validates prefix length based on address family (0-32 for IPv4,
> 0-128 for IPv6), including handling of IPv4-to-IPv6 mapping case.
>
> For IPv4, the prefix length is stored in ip4.prefix_len when provided.
> For IPv6, the given prefix length is still overridden by the default
> value 64
>
> Mixing -n and CIDR notation results in an error to catch likely user
> mistakes.
>
> Also fix a bug in conf_ip4_prefix() that was incorrectly using the
> global 'optarg' instead of its 'arg' parameter.
Applied, apologies for the delay.
At the same time, this still had the conflict with commit 0c611bcd3120
("ip: Add ipproto_name() function"), which I already reported on v9,
two weeks ago, asking to rebase. It's small things but it all adds up.
--
Stefano
next prev parent reply other threads:[~2026-02-24 11:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-16 20:57 Jon Maloy
2026-02-24 11:56 ` Stefano Brivio [this message]
2026-02-24 16:17 ` Jon Maloy
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=20260224125638.7251777e@elisabeth \
--to=sbrivio@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=dgibson@redhat.com \
--cc=jmaloy@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).