Repository navigation
ipvlan: add "flag" option to select bridge, private or vepa - #1321
Open
officialasishkumar wants to merge 1 commit into
Open
officialasishkumar wants to merge 1 commit into
officialasishkumar wants to merge 1 commit into
Conversation
The ipvlan driver in the kernel supports three flags that control how slaves of the same master interact (IFLA_IPVLAN_FLAG): "bridge" (the default), "private" and "vepa". The plugin always created links with the default, leaving no way to isolate ipvlan slaves from each other or to force their traffic through an external switch. Add an optional "flag" field to the network configuration, accepting "bridge" (also the default when unset), "private" or "vepa". The value is passed to netlink when the link is created, and unknown values are rejected. CHECK now also verifies that the flag on the container interface matches the configured one. Tests cover link creation for every flag, the full ADD/CHECK/DEL cycle for each flag, and rejection of an unknown value. Fixes containernetworking#1032 Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an optional
flagfield to the ipvlan plugin configuration, acceptingbridge(default),privateorvepa. It maps to the kernel'sIFLA_IPVLAN_FLAGand is passed to netlink at link creation. Unknown values are rejected.CHECKnow verifies the flag on the container interface matches the configured one. Unset behaves as before (bridge).Tests (Ginkgo): link creation for each flag with the resulting link's flag verified, full ADD/CHECK/DEL for each flag, and rejection of an unknown value. Ran the ipvlan suite with
-raceas root in a privileged container; all 24 specs pass.The user-facing docs live in containernetworking/cni.dev, so the new option still needs a matching entry there.
Fixes #1032