On Tue, Apr 08, 2025 at 08:03:07AM +0200, Stefano Brivio wrote: > 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 Reviewed-by: David Gibson > --- > 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) && -- 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