From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by passt.top (Postfix, from userid 1000) id A921C5A0272; Sun, 14 May 2023 20:14:15 +0200 (CEST) From: Stefano Brivio To: passt-dev@passt.top Subject: [PATCH 04/10] conf: --config-net option is for pasta mode only Date: Sun, 14 May 2023 20:14:09 +0200 Message-Id: <20230514181415.313420-5-sbrivio@redhat.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230514181415.313420-1-sbrivio@redhat.com> References: <20230514181415.313420-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: 6D2XKP7EWQN6CDTLXUG62CHU3F6LEBEK X-Message-ID-Hash: 6D2XKP7EWQN6CDTLXUG62CHU3F6LEBEK X-MailFrom: sbrivio@passt.top X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Callum Parsey , me@yawnt.com, David Gibson , lemmi@nerd2nerd.org X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Reported-by: Andrea Arcangeli Signed-off-by: Stefano Brivio --- 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) -- 2.39.2