diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2023-05-14 14:14:29 +0200 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2023-05-23 16:13:28 +0200 |
commit | 468f19a85268ac122c2a05cf7a8552eebbbb1bbe (patch) | |
tree | d86bd42e646574114f7ef517c14fe38400b58833 | |
parent | 2fe0461856347d404acb60e3343e6e15459cb5e1 (diff) | |
download | passt-468f19a85268ac122c2a05cf7a8552eebbbb1bbe.tar passt-468f19a85268ac122c2a05cf7a8552eebbbb1bbe.tar.gz passt-468f19a85268ac122c2a05cf7a8552eebbbb1bbe.tar.bz2 passt-468f19a85268ac122c2a05cf7a8552eebbbb1bbe.tar.lz passt-468f19a85268ac122c2a05cf7a8552eebbbb1bbe.tar.xz passt-468f19a85268ac122c2a05cf7a8552eebbbb1bbe.tar.zst passt-468f19a85268ac122c2a05cf7a8552eebbbb1bbe.zip |
conf: --config-net option is for pasta mode only
Reported-by: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
-rw-r--r-- | conf.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1184,7 +1184,6 @@ void conf(struct ctx *c, int argc, char **argv) {"userns", required_argument, NULL, 2 }, {"netns", required_argument, NULL, 3 }, {"netns-only", no_argument, &netns_only, 1 }, - {"config-net", no_argument, &c->pasta_conf_ns, 1 }, {"ns-mac-addr", required_argument, NULL, 4 }, {"dhcp-dns", no_argument, NULL, 5 }, {"no-dhcp-dns", no_argument, NULL, 6 }, @@ -1198,6 +1197,7 @@ void conf(struct ctx *c, int argc, char **argv) {"version", no_argument, NULL, 14 }, {"outbound-if4", required_argument, NULL, 15 }, {"outbound-if6", required_argument, NULL, 16 }, + {"config-net", no_argument, NULL, 17 }, { 0 }, }; struct get_bound_ports_ns_arg ns_ports_arg = { .c = c }; @@ -1356,6 +1356,12 @@ void conf(struct ctx *c, int argc, char **argv) die("Invalid interface name: %s", optarg); break; + case 17: + if (c->mode != MODE_PASTA) + die("--config-net is for pasta mode only"); + + c->pasta_conf_ns = 1; + break; case 'd': if (c->debug) die("Multiple --debug options given"); |