From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202512 header.b=VK4V7YXw; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 1F6435A065C for ; Sun, 21 Dec 2025 13:11:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202512; t=1766319092; bh=otIa+hSrIuMuaTnkXuO5XHxrhALlvE4P51luirwbvbo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VK4V7YXwTGbP37XBrA68Q6g40P5M+EApjCo5zq2ZdwpndTuPEfd1BAt8JUd7++YX/ 533zx7IyjFXiza9CVtnKpbymFWBv8jVQU8xCUNvPXbCDobqzyPo/48y9e9aJ1YbbZe yFSO9BydRcV8kAu5PADfgo2CDeXGmwC2c2UZ5hqxds1mYNcUgdXaFASyIFp1Oz9hu+ GzIJvgYUdt0dG+SkNxWW7QqEgfeOvz6o5R/7z9IEP+HsDavz40MsI5kkPuVpW+/sBn bAP19PVHjBNc8d2lcbOTlqsaP6pgKyF/tr1vSHj4cjJCLKk9SwIlV96Ly8qzcvPGVN DIO+f+ZIhB8Nw== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4dZ0Vr2WZfz4wB8; Sun, 21 Dec 2025 23:11:32 +1100 (AEDT) Date: Sun, 21 Dec 2025 23:11:25 +1100 From: David Gibson To: Jon Maloy Subject: Re: [PATCH v3 2/2] doc: Document CIDR notation support for -a/--address option Message-ID: References: <20251218222213.703693-1-jmaloy@redhat.com> <20251218222213.703693-3-jmaloy@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="WV84JJSXXXmd1638" Content-Disposition: inline In-Reply-To: <20251218222213.703693-3-jmaloy@redhat.com> Message-ID-Hash: SEPF2Y6ZSMKSLVBM5A2TFOUY3XCXKGLV X-Message-ID-Hash: SEPF2Y6ZSMKSLVBM5A2TFOUY3XCXKGLV X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: sbrivio@redhat.com, dgibson@redhat.com, passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --WV84JJSXXXmd1638 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 18, 2025 at 05:22:13PM -0500, Jon Maloy wrote: > Update the man page to document the new CIDR notation support: >=20 > - Update -a/--address to show addr[/prefix_len] syntax > - Document that prefix length (0-32) can be appended for IPv4 > - Note that mixing CIDR notation with -n results in an error > - Update -n/--netmask to mention CIDR alternative >=20 > Signed-off-by: Jon Maloy I don't see much reason to keep this a separate patch from the previous one. > --- > passt.1 | 10 ++++++++-- > 1 file changed, 8 insertions(+), 2 deletions(-) >=20 > diff --git a/passt.1 b/passt.1 > index db0d662..117239f 100644 > --- a/passt.1 > +++ b/passt.1 > @@ -156,10 +156,14 @@ By default, the advertised MTU is 65520 bytes, that= is, the maximum 802.3 MTU > minus the length of a 802.3 header, rounded to 32 bits (IPv4 words). > =20 > .TP > -.BR \-a ", " \-\-address " " \fIaddr > +.BR \-a ", " \-\-address " " \fIaddr\fR[\fB/\fR\fIprefix_len\fR] > Assign IPv4 \fIaddr\fR via DHCP (\fByiaddr\fR), or \fIaddr\fR via DHCPv6= (option > 5) and an \fIaddr\fR-based prefix via NDP Router Advertisement (option t= ype 3) > for an IPv6 \fIaddr\fR. > +For IPv4 addresses, an optional \fB/\fR\fIprefix_len\fR (0-32) can be > +appended in CIDR notation (e.g., 192.168.1.1/24). This is an alternative= to > +using the \fB-n\fR, \fB--netmask\fR option. Mixing CIDR notation with > +\fB-n\fR results in an error. This seems to imply that the CIDR notation is only for Ipv4, which is not what's implemented. > This option can be specified zero (for defaults) to two times (once for = IPv4, > once for IPv6). > By default, assigned IPv4 and IPv6 addresses are taken from the host int= erfaces > @@ -172,7 +176,9 @@ is assigned for IPv4, and no additional address will = be assigned for IPv6. > .TP > .BR \-n ", " \-\-netmask " " \fImask > Assign IPv4 netmask \fImask\fR, expressed as dot-decimal or number of bi= ts, via > -DHCP (option 1). > +DHCP (option 1). Alternatively, the prefix length can be specified using= CIDR > +notation with the \fB-a\fR, \fB--address\fR option (e.g., \fB-a\fR 192.1= 68.1.1/24). > +Mixing \fB-n\fR with CIDR notation results in an error. > By default, the netmask associated to the host address matching the assi= gned one > is used. If there's no matching address on the host, the netmask is dete= rmined > according to the CIDR block of the assigned address (RFC 4632). Pre-existing, but this seems a bit misleading. If we *don't* specify -a, then, yes, the netmask will be copied from the host, along with the address. If we specify a specific address with -a, I think we'll always use the network class (which is rarely useful these days), even if the specified address happens to be one that's on the host. --=20 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 --WV84JJSXXXmd1638 Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmlH498ACgkQzQJF27ox 2GdtIw/8COPKdO+3zzt5neHbpnKIZ/ZT5XxqKhwwXJ8LnSIIBuyM55VD551sJ7sT CFJCgO38rB1yMrkWpwHJxyBLErg6Yqvulnbag/y4lJulCv+1NelGEwPDse37e2jQ NbS0eZO/RJ4N0mdyjWQw0G9N0WnMotfD9sezZXjKKqGugu4U2lRojfAUyWgI0gT9 CQUMyi3h86jb6Q9t6xKNurGHFDeGl0WBsrCS6byzWd7r3jt49BzFXd06HZBu87X9 yeiP01YjjEzhtTVoJaboqDvIqqgOfEMu1ggYgPxaXIMoTceNXd4qMXdg4AyuRor3 2wipYyBDUKF2209g17+CdAuVMERKoKQiWXSDpGhZPqVvqeP4i6v1Jky4bQjRp3Bu xwpYWpcBYaWNnmpL6XIlzwpR3pjJKjlzkeQwpmgGWt6TTWvdPyNml+CbUVcR7YEJ HdBYWskusH1lhqTFxs2KP4KYZMfIeqZN1rGG86Le0uCHhBlN1pr0WVm0+8tDdM5p ciL93F/OAH3xVnUL2zv2d5h3h3C4B5PRzQ4EUbRrmVbZhHxlRwOCSDLfU4DMuLDw Oug2j2c5zDcfKZxnLST3s2U/buEg8kqCQc/z5LEm1B795lfQ5MxzP4edj/3xZHCx yrr4vpT59CF5xTS6HAQTCWBZUkUKrssSAVa8OWNjxXTvbU++Ra8= =OWKH -----END PGP SIGNATURE----- --WV84JJSXXXmd1638--