-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
interface: fix handling of interface renames
Whenever an interface netlink message is received from the kernel, the interface should be identified by its ifindex, and not by its name. This is because ifindexes are immutable, whereas interface names can change over time. This fix resolves a regression where holod wasn't working correctly within containerlab, which does interface renaming after their initial creation. Additionally, the `Interfaces` struct is updated to use two BTreeMaps backed by an interface arena. This modification allows for efficient lookups using both interface names and ifindexes. Signed-off-by: Renato Westphal <[email protected]>
- Loading branch information
Showing
4 changed files
with
114 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters