On Sun, May 14, 2023 at 08:14:09PM +0200, Stefano Brivio wrote: > Reported-by: Andrea Arcangeli > Signed-off-by: Stefano Brivio Reviewed-by: David Gibson Also makes sense regardless of the rest of the series. > --- > conf.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/conf.c b/conf.c > index aad2b00..bc1ae99 100644 > --- a/conf.c > +++ b/conf.c > @@ -1198,7 +1198,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 }, > @@ -1212,6 +1211,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 }; > @@ -1369,6 +1369,12 @@ void conf(struct ctx *c, int argc, char **argv) > if (ret <= 0 || ret >= (int)sizeof(c->ip6.ifname_out)) > 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) -- David Gibson | 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