interface: handle is_bridge and is_bond hacks in a single place

This commit is contained in:
Ariadne Conill 2020-08-20 04:07:51 -06:00
parent aba140a977
commit 6d15f21073
2 changed files with 6 additions and 12 deletions

View file

@ -137,6 +137,12 @@ lif_interface_use_executor(struct lif_interface *interface, const char *executor
if (lif_dict_add_once(&interface->vars, "use", exec_addon, (lif_dict_cmp_t) strcmp) == NULL)
free(exec_addon);
/* pass requires as compatibility env vars to appropriate executors (bridge, bond) */
if (!strcmp(executor, "bridge"))
interface->is_bridge = true;
else if (!strcmp(executor, "bond"))
interface->is_bond = true;
}
void