Skip to content

Commit

Permalink
Use inbound policy in TestXfrmPolicyWithOptional
Browse files Browse the repository at this point in the history
Since kernel commit
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3d776e31c841b
optional tunnel/BEET mode templates in outbound policies are rejected.

Use an inbound policy instead to fix the test failure on newer kernels.
  • Loading branch information
tklauser committed Oct 24, 2023
1 parent c4d5291 commit 03f5860
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions xfrm_policy_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux
// +build linux

package netlink
Expand Down Expand Up @@ -195,6 +196,7 @@ func TestXfrmPolicyWithOptional(t *testing.T) {
defer setUpNetlinkTest(t)()

pol := getPolicy()
pol.Dir = XFRM_DIR_IN
pol.Tmpls[0].Optional = 1

if err := XfrmPolicyAdd(pol); err != nil {
Expand Down

0 comments on commit 03f5860

Please sign in to comment.