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=202606 header.b=FQIcQYbO; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 016D35A0265 for ; Wed, 01 Jul 2026 05:03:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202606; t=1782875034; bh=fKxadfdDV4K0HmZ+tH/7zoeP9evmTVMVDuEyzQ3joXU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FQIcQYbOjCIovL2l/A6vMqHI0yD4FezASdBuY55t/vsZs/78fBqMa4CFfeWa98MZZ GTbfI5KSWJLI27+8obAIwFsD34Fcbt9FAcgSgDUZbnGfqBS7DqllvDK2nU9To8E/Gw 8a77CdK4mjCe3ExyOE3vko/zQmXNnQ9cSVxyAAssuxeW5iXuTXRHsYcYd45p8Q5tzX ZXMnQz089k2g1rHRkaNpyf45x6hz3x/XA40rhcQbEDtKG+k4g8YCenenCcsF27kPUM rpY6ByScvfgcnpI3qgxcu+JPfz2zh97voAwfTA5aYkZlFa/yMwppU1eR540/QgppXg JIeR8kms3Y4ow== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4gqlGL3JyLz4wTb; Wed, 01 Jul 2026 13:03:54 +1000 (AEST) Date: Wed, 1 Jul 2026 11:24:17 +1000 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH 02/12] conf: Use parameter instead of global in conf_nat() Message-ID: References: <20260626071003.3472194-1-david@gibson.dropbear.id.au> <20260626071003.3472194-3-david@gibson.dropbear.id.au> <20260701020705.574f259e@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="KszJtcmeOG/KaLVy" Content-Disposition: inline In-Reply-To: <20260701020705.574f259e@elisabeth> Message-ID-Hash: X6DASMFX6Y5TFF5YKXPG2MYEK3LFSWJ6 X-Message-ID-Hash: X6DASMFX6Y5TFF5YKXPG2MYEK3LFSWJ6 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: 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: --KszJtcmeOG/KaLVy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 01, 2026 at 02:07:06AM +0200, Stefano Brivio wrote: > On Fri, 26 Jun 2026 17:09:53 +1000 > David Gibson wrote: >=20 > > Conf nat takes a parameter @arg for the argument it's parsing. However= on >=20 > Nit: conf_nat(). Huh. What a weird mistake to make. Oh well, fixed. >=20 > > error we print instead optarg, the getopt() global. This happens to be= the > > same thing at the time of the call, but it's not the right way to get to > > it. > >=20 > > Signed-off-by: David Gibson > > --- > > conf.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > >=20 > > diff --git a/conf.c b/conf.c > > index 4755a9f4..6ab8efec 100644 > > --- a/conf.c > > +++ b/conf.c > > @@ -1049,7 +1049,7 @@ static void conf_nat(const char *arg, struct in_a= ddr *addr4, > > !IN4_IS_ADDR_MULTICAST(addr4)) > > return; > > =20 > > - die("Invalid address to remap to host: %s", optarg); > > + die("Invalid address to remap to host: %s", arg); > > } > > =20 > > /** >=20 > --=20 > Stefano >=20 --=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 --KszJtcmeOG/KaLVy Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIyBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmpEbD0ACgkQzQJF27ox 2GfNBQ/3TUiosHeKgb5sWbOKOTyZJE/3VjyrWSYiaiGs8bQC/OCxFBqn7gGwSkck tu5qYqaelpAmNxq3fq8pFD2bp10hWFa7p1MxCQLPpgUg5mscx3BgTa26AkQAHcMB 5JyUu77f6JrsIRNCJeZkLSCtDTij+TWT1NQNT8ugCgOrB0y+dQnR0tDnxtxjpvfd gXigH10aImeJldKxRGzuNzpr7IkMRaTrAQ0BLa3A7vpusCC5VN6+3k5dI9MD6NX1 imry6rsI7YBbHXUNEN7WClErAbIdjjLmf7b7/ADtZrkNaVXkqgq7w11Nw9Ok3BKi BQE0R3YpZXCV0MRTqsSgX0B8Nd5sVLkrXj8MHw2Hd8MHjGvYJ6eeMhyNo87EjDfu KUPlpy35jVaNA6O2mFdeBlJxHjcGtR+lsrsm5Rwdi56+AqlvY4EF+XiKhVKGtkWB 1KcvkC2bIO8apAjJbk5jbhhAw84rXlX4Q18ciM2+08ZikTv3A6jFh+4CcjZDkGaE pfsOAVrKHQi+XrfBkw3NaPgUiwe/Oc7O5b1Amn7+plwz10HWOV4S/6VKXKWYMcFN jnpVp8nQ6zlnfWW/qA30bRNXGAYy2HJmruWki/0qK8M3QrA+vCoNV2xZ4/glO6Re c0j+RhQxy98cLlsQE97sGhJ43V8QX7juKJKAtZXgwJLSmKHXQg== =Cfg8 -----END PGP SIGNATURE----- --KszJtcmeOG/KaLVy--