-
Notifications
You must be signed in to change notification settings - Fork 731
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for action and ifindex in XFRM policy
The action and ifindex fields aren't represented in the XfrmPolicy type although they exist in the the linux equivalent data structures. They are represented in the serialized versions of those datatypes. So this patch simply exposes those fields to the user-consumable side of the API. This patch makes the policy's action a specific type in the same style as the Dir field in XfrmPolicy. Update the existing unit tests to compare Ifindex and Action fields in the XFRM structure. Verify that the default policy returns an action of ALLOW and an ifindex of 0. Add a unit test to add and read back a policy to the loopback interface (ifindex 1) with action "block". Signed-off-by: Chris Telfer <ctelfer@docker.com>
- Loading branch information
Showing
3 changed files
with
60 additions
and
2 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