interface: if an interface name contains a period, treat it as a vlan device
This commit is contained in:
parent
66e6a09bbe
commit
049af8b9fb
1 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||||
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
|
bool
|
||||||
|
|
Loading…
Reference in a new issue