aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2025-04-08 07:57:51 +0200
committerStefano Brivio <sbrivio@redhat.com>2025-04-09 22:52:49 +0200
commitffbef85e975ba117ed1c20f733d989ac08ebf325 (patch)
treed83d4f910edab48e632b1ced4b0958cd1176b97e
parent06ef64cdb72475fd02c72cdd607a31a86605e734 (diff)
downloadpasst-ffbef85e975ba117ed1c20f733d989ac08ebf325.tar
passt-ffbef85e975ba117ed1c20f733d989ac08ebf325.tar.gz
passt-ffbef85e975ba117ed1c20f733d989ac08ebf325.tar.bz2
passt-ffbef85e975ba117ed1c20f733d989ac08ebf325.tar.lz
passt-ffbef85e975ba117ed1c20f733d989ac08ebf325.tar.xz
passt-ffbef85e975ba117ed1c20f733d989ac08ebf325.tar.zst
passt-ffbef85e975ba117ed1c20f733d989ac08ebf325.zip
conf: Add missing return in conf_nat(), fix --map-guest-addr none
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 <sbrivio@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
-rw-r--r--conf.c2
1 files changed, 2 insertions, 0 deletions
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) &&