forked from kata-containers/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
network: Don't store the network info as pointers if slices used
By storing the network information such as routes as pointers, we end up having issues if we try to remove some elements from the list as at the same time this list is parsed through by a loop. For interfaces, we can use maps instead, because we have a way to keep track of them based on their names. Maps are safer and allow to keep pointers in this case. In both cases, routes and interfaces list can be modified properly while we loop over every items. Fixes kata-containers#226 Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
- Loading branch information
Sebastien Boeuf
committed
Apr 30, 2018
1 parent
74e720e
commit 1f5cf20
Showing
2 changed files
with
9 additions
and
12 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