From 049af8b9fb717461da4dc50dcf7542616d2fcbc5 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Tue, 4 Aug 2020 12:29:31 -0600 Subject: [PATCH] interface: if an interface name contains a period, treat it as a vlan device --- libifupdown/interface.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libifupdown/interface.c b/libifupdown/interface.c index 66b1d02..8841c13 100644 --- a/libifupdown/interface.c +++ b/libifupdown/interface.c @@ -62,7 +62,11 @@ lif_interface_init(struct lif_interface *interface, const char *ifname) memset(interface, '\0', sizeof *interface); interface->ifname = strdup(ifname); - lif_dict_add(&interface->vars, "use", strdup("link")); + + if (strchr(ifname, '.') == NULL) + lif_dict_add(&interface->vars, "use", strdup("link")); + else + lif_dict_add(&interface->vars, "use", strdup("vlan")); } bool