Add support for bonding / LAGs.

* Add a bond executor
  * Add mappings from ifupdown1/2
  * Add a detailed man page
  * Remove legacy compatiblity glue for setups with 'requires' only

  The current implementation has to work around the fact that member interfaces
  will be already up then the bond is created. This is simply done by downing
  them, adding them to the bundle and upping them again. This can possible be
  done in a nicer way after revisiting the ordering of plugin execution (#12).

  Closes #91

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
This commit is contained in:
Maximilian Wilhelm 2020-10-04 01:35:41 +02:00
parent cc06712611
commit 9ee3a874d4
6 changed files with 273 additions and 4 deletions

View file

@ -28,6 +28,8 @@ struct remap_token {
/* this list must be in alphabetical order for bsearch */
static const struct remap_token tokens[] = {
{"bond-ad-sys-priority", "bond-ad-actor-sys-prio"}, /* ifupdown2 */
{"bond-slaves", "bond-members"}, /* legacy ifupdown, ifupdown2 */
{"driver-message-level", "ethtool-msglvl"}, /* Debian ethtool integration */
{"endpoint", "tunnel-remote"}, /* legacy ifupdown */
{"ethernet-autoneg", "ethtool-ethernet-autoneg"}, /* Debian ethtool integration */

View file

@ -163,9 +163,6 @@ build_environment(char **envp[], const struct lif_execute_opts *opts, const stru
{
if (iface->is_bridge)
lif_environment_push(envp, "IF_BRIDGE_PORTS", (const char *) entry->data);
if (iface->is_bond)
lif_environment_push(envp, "IF_BOND_SLAVES", (const char *) entry->data);
}
char envkey[4096] = "IF_";