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=202504 header.b=fOs+ZOTR; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 9619F5A0274 for ; Tue, 08 Apr 2025 08:40:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202504; t=1744094394; bh=fFriELobaFezsvjfk4gV0u+DRTWRa8TTGyVWuu+EOiQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fOs+ZOTRM6A5tHvSpyfOR+AXZ5N64NDCt7BY0jvNkb/VlaepmsrOgww4YLb32AMCl 0tEANl3ZXpwHgDmrn4nUFgLdzWUJnwcuUCfBcTHJiFbARLRsk8vgH242ZkZusPHp9R XqDcaHj45V0eJHFqAbM9komUhmGc1VrNFRIEp4yrCOTBFv8kEIFWCwlfEM5AbeiGcY JUk5i2aw/Y0bSueM//AUVwLgkeV0QU2wcusVoKRcCr+lkMjd+Rze9a4BN0IGwOBAlr 6rTe7vseozJDMCmp5e5boM9RuJSUrBp0UbaKs0uSFeF13WwieVztFoPgnWAwrhIFj/ lmKqQpU++BJwg== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4ZWxJp3SJsz4wcZ; Tue, 8 Apr 2025 16:39:54 +1000 (AEST) Date: Tue, 8 Apr 2025 16:39:50 +1000 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH] conf: Add missing return in conf_nat(), fix --map-guest-addr none Message-ID: References: <20250408060307.589700-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="QKgkMPBLe09j77lT" Content-Disposition: inline In-Reply-To: <20250408060307.589700-1-sbrivio@redhat.com> Message-ID-Hash: TXNC5IPGSOAVD6QD5MMSUGY5FFZG44PJ X-Message-ID-Hash: TXNC5IPGSOAVD6QD5MMSUGY5FFZG44PJ 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: --QKgkMPBLe09j77lT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 08, 2025 at 08:03:07AM +0200, Stefano Brivio wrote: > As reported by somebody on IRC: >=20 > $ pasta --map-guest-addr none > Invalid address to remap to host: none >=20 > that's because once we parsed "none", we try to parse it as an address > as well. But we already handled it, so stop once we're done. >=20 > Fixes: e813a4df7da2 ("conf: Allow address remapped to host to be configur= ed") > Signed-off-by: Stefano Brivio Reviewed-by: David Gibson > --- > conf.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/conf.c b/conf.c > index b54c55d..168646f 100644 > --- a/conf.c > +++ b/conf.c > @@ -1272,6 +1272,8 @@ static void conf_nat(const char *arg, struct in_add= r *addr4, > *addr6 =3D in6addr_any; > if (no_map_gw) > *no_map_gw =3D 1; > + > + return; > } > =20 > if (inet_pton(AF_INET6, arg, addr6) && --=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 --QKgkMPBLe09j77lT Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmf0xLUACgkQzQJF27ox 2Ge6Qg/+Li/mjC91NGQHqzE2fv+UKr9kQ2NjUE8ZLOuB0kMMrp+MOybQrAmsTFEN rGRxw5wV3DW/uYeQDRwjakWCcaksN4WL4m4kmYdwgR2hVZRJ11COZOe5dIFAav90 YzUV6u+ZVO6RbdYwY7LhjZ6M8oQftXwO7v6gZ0ShttYwPgbXr/MvjQkg5eoXGSiw XEiRGmftl267eXy4DLq9N4/S5rPXxg0bUxWyfLqdGzkV91aXIa2IKQoiX0Aq4cqU FGgNJHa4vbkz5Vn6O39LsHqw4vV/DPRfbdOW7XtYNsfMwel6TZNH0HLpd9FOWgYB kraXdNWG1QtW+dGh4qFcIMC90rYBkXr8Y3ORbSuQn1K2Ix3MB+dBeirh+m6BDlHX oej0cZWHroeD5j7Vx/fLzEIbjyN/ZcMvZ856RIjfoFGB3H/6yT9OIMeEu3fkfFaP uPHR1OPwe46MQnKOfaXorfnNtUtFZOUmbdrhTiJohu8Ry2wo3AHDLb7kDc7SWd9N I8AvDhn+/la1Y7pb9uO4McLOBCm+jCkIM8KEPNvmbLgKez6Q1sJytfbddqeHBxHS ACnXsBVqaa9RxxjJfjSJFk+Mb+i7szy9Q638mGMh5VJsMc8kcsEOMBr3Bbb0ewA0 kcxpBS1nGX9lCKrSeExcRLZBnQG8ncP+nmV8XQY75RDLzeqAhyE= =fKmO -----END PGP SIGNATURE----- --QKgkMPBLe09j77lT--