diff --git a/libifupdown/interface-file.c b/libifupdown/interface-file.c index f9d70dc..d75e53e 100644 --- a/libifupdown/interface-file.c +++ b/libifupdown/interface-file.c @@ -236,6 +236,12 @@ handle_iface(struct lif_dict *collection, const char *filename, size_t lineno, c return false; } + /* mark the cur_iface as a template iface if `template` keyword + * is used. + */ + if (!strcmp(token, "template")) + cur_iface->is_template = true; + /* in original ifupdown config, we can have "inet loopback" * or "inet dhcp" or such to designate hints. lets pick up * those hints here. diff --git a/libifupdown/interface.h b/libifupdown/interface.h index d627610..c36690d 100644 --- a/libifupdown/interface.h +++ b/libifupdown/interface.h @@ -50,6 +50,7 @@ struct lif_interface { bool is_auto; bool is_bridge; bool is_bond; + bool is_template; struct lif_dict vars;