From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by passt.top (Postfix, from userid 1000) id 168DB5A0271; Tue, 08 Apr 2025 08:03:07 +0200 (CEST) From: Stefano Brivio To: passt-dev@passt.top Subject: [PATCH] conf: Add missing return in conf_nat(), fix --map-guest-addr none Date: Tue, 8 Apr 2025 08:03:07 +0200 Message-ID: <20250408060307.589700-1-sbrivio@redhat.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: HPFC72267P4P6CJNZGCJZJVPGYI2HK2P X-Message-ID-Hash: HPFC72267P4P6CJNZGCJZJVPGYI2HK2P X-MailFrom: sbrivio@passt.top 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: David Gibson 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: As reported by somebody on IRC: $ pasta --map-guest-addr none Invalid address to remap to host: none 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. Fixes: e813a4df7da2 ("conf: Allow address remapped to host to be configured") Signed-off-by: Stefano Brivio --- conf.c | 2 ++ 1 file changed, 2 insertions(+) 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_addr *addr4, *addr6 = in6addr_any; if (no_map_gw) *no_map_gw = 1; + + return; } if (inet_pton(AF_INET6, arg, addr6) && -- 2.43.0