Skip to content

Commit a0f4a32

Browse files
committed
datapath: Fix TestNodeChurnXFRMLeaks
This commit fixes the following issues: * Missed enablement of the churn tests in the non-subnet mode. * The subnet mode being broken when v4 and v6 enabled [1]. [1]: cilium#27280 Fixes: 9207b78 ("datapath: Cover subnet encryption in XFRM leak test") Signed-off-by: Martynas Pumputis <[email protected]>
1 parent fc9c8a9 commit a0f4a32

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

pkg/datapath/linux/node_linux_test.go

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -752,15 +752,27 @@ func (s *linuxPrivilegedBaseTestSuite) TestNodeUpdateIDs(c *check.C) {
752752

753753
// Tests that we don't leak XFRM policies and states as nodes come and go.
754754
func (s *linuxPrivilegedBaseTestSuite) TestNodeChurnXFRMLeaks(c *check.C) {
755-
externalNodeDevice := "ipsec_interface"
756755

757756
// Cover the XFRM configuration for IPAM modes cluster-pool, kubernetes, etc.
758757
config := datapath.LocalNodeConfiguration{
759758
EnableIPv4: s.enableIPv4,
760759
EnableIPv6: s.enableIPv6,
761760
EnableIPSec: true,
762761
}
763-
//s.testNodeChurnXFRMLeaksWithConfig(c, config)
762+
s.testNodeChurnXFRMLeaksWithConfig(c, config)
763+
}
764+
765+
// Tests the same as linuxPrivilegedBaseTestSuite.TestNodeChurnXFRMLeaks just
766+
// for the subnet encryption. IPv4-only because of https://github.com/cilium/cilium/issues/27280.
767+
func (s *linuxPrivilegedIPv4OnlyTestSuite) TestNodeChurnXFRMLeaks(c *check.C) {
768+
externalNodeDevice := "ipsec_interface"
769+
770+
// Cover the XFRM configuration for IPAM modes cluster-pool, kubernetes, etc.
771+
config := datapath.LocalNodeConfiguration{
772+
EnableIPv4: s.enableIPv4,
773+
EnableIPSec: true,
774+
}
775+
s.testNodeChurnXFRMLeaksWithConfig(c, config)
764776

765777
// In the case of subnet encryption (tested below), the IPsec logic
766778
// retrieves the IP address of the encryption interface directly so we need

0 commit comments

Comments
 (0)