interface: if an interface name contains a period, treat it as a vlan device

This commit is contained in:
Ariadne Conill 2020-08-04 12:29:31 -06:00
parent 66e6a09bbe
commit 049af8b9fb

View file

@ -62,7 +62,11 @@ lif_interface_init(struct lif_interface *interface, const char *ifname)
memset(interface, '\0', sizeof *interface); memset(interface, '\0', sizeof *interface);
interface->ifname = strdup(ifname); interface->ifname = strdup(ifname);
if (strchr(ifname, '.') == NULL)
lif_dict_add(&interface->vars, "use", strdup("link")); lif_dict_add(&interface->vars, "use", strdup("link"));
else
lif_dict_add(&interface->vars, "use", strdup("vlan"));
} }
bool bool