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=EtfrYj6a; 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 B8F245A0265 for ; Tue, 24 Feb 2026 12:56:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1771934203; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=k2qtsGafcrQ5PPt8IIMeWJqp3UuZWcQ7eNKvsjhstww=; b=EtfrYj6a6bUXfrQ2FkrjkXAAblu0BfU61pFEWhs96yQf0INiVyz+D/lbw6/G+9eW9K4mQt ZzvE/+/pm67f5+J5I94qQQpsHSgJaDhmRnw8T9ZTtz5PiR6Fp4GI8dkGo9grMEa/u3dCdo 79kHIt+LzV1RopTIC+yGTBr8lJgZrNE= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-554-XQZ0rwYxNX2bM_ZiRCSpaA-1; Tue, 24 Feb 2026 06:56:41 -0500 X-MC-Unique: XQZ0rwYxNX2bM_ZiRCSpaA-1 X-Mimecast-MFC-AGG-ID: XQZ0rwYxNX2bM_ZiRCSpaA_1771934201 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-4806b12ad3fso40898105e9.0 for ; Tue, 24 Feb 2026 03:56:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771934201; x=1772539001; h=date:content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=k2qtsGafcrQ5PPt8IIMeWJqp3UuZWcQ7eNKvsjhstww=; b=fLIO/ygsHGqKTyskR2Xgh3pENGAN7vMO8K5oB+pHOoGpXh2UcvAScudofFtxlgwc0I J0GT3N3atO6ambs56AcR2p9Xp7hQo+NDYvutJs5woDBuyB3WfzeznR6XtOQ020lSVjHY wJ0Be+74UIIDpsCOr6nyQKhzfjWM2WY+2yRndElUzqEnIolOBs9M9kONBHQK701kojiF EDPlAgaBigENc70E81wJ0W15ZHKqGL1Gt6s8BSJDK1dsSQ9YP3UkbBNH1tX2xqiRgYec 35SR3Hy/AzRIXUcfkJjJbNPYDN0T9BK/hHFCpFLgkE5WABOC+hWL7vs2wUo0W/ck1CWA tflA== X-Forwarded-Encrypted: i=1; AJvYcCXtEzymM3CX/LFBCf74uFiOANoK8Fda7uouWPm1ymMW5/UIyR+gyZ/JhlC+6LBzYH0Ye7tSHiYyFx4=@passt.top X-Gm-Message-State: AOJu0Yx0crNtBowTxl1NVu9H69otDmfWbKREDwKLN4trZsq9sZsV70w1 be2cQfAjaHXchnHwgzbyU3J7saW7K7nd11veEfr96a+gtCW0lFK7Wd/VeGAHHGsvNatGEYUbvPf BzkvCl3q3Yeh/YiQU+3qbH6y5uw+xDM657tUPtgkCkx8qHZYBoZpbHw== X-Gm-Gg: AZuq6aJiz1wG/tIqHTz8lH8nGiK4ipLHbS8YC6dWOJZ8OTAdRLTPvUGXpLucVQCw3Z3 iK4dLFJKYna2cGdU8G0aalxLTjkPCO/+AQZh8YEzpslrAOmCd9F+VfXr9BEdhiIzlX3CHy0LwEq 7lcKl7xUxBVNNTMeEWBK2/g7sGkLUAJDuwySqBWNGJr0OUNvODjZJuo8VlFHf4f1kU6p28wD7Nx nBqv1+rywUGkSUiWaSmCxqW+EbYojUGx6U8jYraz09LABOSEMnbVW83IVXuZklexdKRy0AQqKD9 2cnWJiosNnaZpnqVqaeBm07/kQTQsaJrA0kC2h3/BVvaw/Vt7WzNgN6F7zaIyQOoEKmHPFZZhGQ wnU3yc3YBy77IgkRo6GUgbjqtM8W8duSF X-Received: by 2002:a05:600c:6094:b0:47e:e8de:7420 with SMTP id 5b1f17b1804b1-483a962f0c5mr180977785e9.22.1771934200619; Tue, 24 Feb 2026 03:56:40 -0800 (PST) X-Received: by 2002:a05:600c:6094:b0:47e:e8de:7420 with SMTP id 5b1f17b1804b1-483a962f0c5mr180977225e9.22.1771934200061; Tue, 24 Feb 2026 03:56:40 -0800 (PST) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [2a10:fc81:a806:d6a9::1]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-483b88e9c4esm28033755e9.5.2026.02.24.03.56.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Feb 2026 03:56:39 -0800 (PST) From: Stefano Brivio To: Jon Maloy Subject: Re: [PATCH v11] conf: Support CIDR notation for -a/--address option Message-ID: <20260224125638.7251777e@elisabeth> In-Reply-To: <20260216205741.3648357-1-jmaloy@redhat.com> References: <20260216205741.3648357-1-jmaloy@redhat.com> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.49; x86_64-pc-linux-gnu) MIME-Version: 1.0 Date: Tue, 24 Feb 2026 12:56:39 +0100 (CET) X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 5WTHdOnO-iP79I_z-4NzYSGPCMOFrwvucmXjAI_ERz8_1771934201 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: QS6TWWQ5WSORZVHEBNSFXQAELJQD35KN X-Message-ID-Hash: QS6TWWQ5WSORZVHEBNSFXQAELJQD35KN X-MailFrom: sbrivio@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 CC: dgibson@redhat.com, david@gibson.dropbear.id.au, 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: On Mon, 16 Feb 2026 15:57:41 -0500 Jon Maloy 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