From f9683c2242e84cb24fa35d9f4cf3d24a9a6c4069 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Wed, 23 Sep 2020 11:42:09 -0600 Subject: [PATCH] ifupdown: complain to the user if they try to bring up or tear down a template interface --- cmd/ifupdown.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/ifupdown.c b/cmd/ifupdown.c index ad20df4..e08feee 100644 --- a/cmd/ifupdown.c +++ b/cmd/ifupdown.c @@ -96,6 +96,9 @@ acquire_state_lock(const char *state_path, const char *lifname) bool skip_interface(struct lif_interface *iface, const char *ifname) { + if (iface->is_template) + fprintf(stderr, "%s: cannot change state on %s (template interface)\n", argv0, ifname); + if (exec_opts.force) return false;