From: Jon Maloy <jmaloy@redhat.com>
To: Stefano Brivio <sbrivio@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 11:17:39 -0500 [thread overview]
Message-ID: <7aa24cbf-35eb-4aec-addd-00c8c31698d0@redhat.com> (raw)
In-Reply-To: <20260224125638.7251777e@elisabeth>
On 2026-02-24 06:56, Stefano Brivio wrote:
> 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.
>
Yeah, I rebased for the large series, which of course comprised rebase
of this one too, but I forgot to re-post it.MR#466, qemu-kvm-9.8
///j
prev parent reply other threads:[~2026-02-24 16:17 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
2026-02-24 16:17 ` Jon Maloy [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=7aa24cbf-35eb-4aec-addd-00c8c31698d0@redhat.com \
--to=jmaloy@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=dgibson@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).