bisdn / basebox

A tiny OpenFlow controller for OF-DPA switches.
Mozilla Public License 2.0
45 stars 9 forks source link

nl_bond: only apply ip configuration once #316

Closed KanjiMonster closed 3 years ago

KanjiMonster commented 3 years ago

Only apply/scan for IP configuratiion when creating the bond interface, not on every update.

Description

Currently we call add_ip_configuraiton multiple times for the same bond interface, on every update and new member. This leads to ip configuration being parsed multiple times, which can easily lead to refcounting issues.

Since we now only add IP configuration on creation, we also need to make sure that we only create a bond interface when we actually have an interface of our own to add.

Motivation and Context

We should try to stay consistent in our applied configuration, and try to not apply multiple times, especially if we want to be able to undo the changes on removal.

How Has This Been Tested?

Weekend pipelines ran with this code and did not show any issues caused by it.