mirror of
https://passt.top/passt
synced 2025-05-19 16:05:35 +02:00
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: e813a4df7d
("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>
This commit is contained in:
parent
06ef64cdb7
commit
ffbef85e97
1 changed files with 2 additions and 0 deletions
2
conf.c
2
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) &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue