From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=icjnit/j; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTPS id B3E9E5A065B for ; Thu, 18 Dec 2025 23:22:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1766096541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TXlR5yDk5ANGcv/oG5Oi940QCzL+A6rFBxP4sEpgdP4=; b=icjnit/jdjrAyzdEzl85FUWEXlflUKCSmpb+gZKtZTLV6prRidKc4RQtgGkCMKz3NvrEbv C1AUPi9KilroiaXRwaA7XyWOTAA5YG9tByrNAoTRkcYqCYikE5HrXaRGpTVlf/3TLjDQW2 3eCuM/Jf47ggCCKZl0RoLDB+plxuVH0= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-626-OFiTMaXkOGOyatQ9I3gMag-1; Thu, 18 Dec 2025 17:22:20 -0500 X-MC-Unique: OFiTMaXkOGOyatQ9I3gMag-1 X-Mimecast-MFC-AGG-ID: OFiTMaXkOGOyatQ9I3gMag_1766096539 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 89B6918002C9; Thu, 18 Dec 2025 22:22:19 +0000 (UTC) Received: from jmaloy-thinkpadp16vgen1.rmtcaqc.csb (unknown [10.22.88.106]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5A254180049F; Thu, 18 Dec 2025 22:22:18 +0000 (UTC) From: Jon Maloy To: sbrivio@redhat.com, dgibson@redhat.com, david@gibson.dropbear.id.au, jmaloy@redhat.com, passt-dev@passt.top Subject: [PATCH v3 2/2] doc: Document CIDR notation support for -a/--address option Date: Thu, 18 Dec 2025 17:22:13 -0500 Message-ID: <20251218222213.703693-3-jmaloy@redhat.com> In-Reply-To: <20251218222213.703693-1-jmaloy@redhat.com> References: <20251218222213.703693-1-jmaloy@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 1yX2XSgJth6BSIl8mD2Uz1V8gfcUHA2imAjVmH07FiI_1766096539 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true Message-ID-Hash: XD6ZYO635RHBO6ZHBLKNFU7QNN6LWYD5 X-Message-ID-Hash: XD6ZYO635RHBO6ZHBLKNFU7QNN6LWYD5 X-MailFrom: jmaloy@redhat.com 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 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: Update the man page to document the new CIDR notation support: - 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 Signed-off-by: Jon Maloy --- passt.1 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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). .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 type 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 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 interfaces @@ -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 bits, 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.168.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 assigned one is used. If there's no matching address on the host, the netmask is determined according to the CIDR block of the assigned address (RFC 4632). -- 2.52.0