Skip to content

Commit

Permalink
Fix ipset command in nft mode
Browse files Browse the repository at this point in the history
  • Loading branch information
caseydavenport committed Jun 12, 2024
1 parent 9882fca commit a6b4595
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions felix/fv/vxlan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -659,9 +659,17 @@ var _ = infrastructure.DatastoreDescribe("_BPF-SAFE_ VXLAN topology before addin
// BPF mode doesn't use the IP set.
if vxlanMode == api.VXLANModeAlways && !BPFMode() {
It("after manually removing third node from allow list should have expected connectivity", func() {
felixes[0].Exec("ipset", "del", "cali40all-vxlan-net", felixes[2].IP)
if enableIPv6 {
felixes[0].Exec("ipset", "del", "cali60all-vxlan-net", felixes[2].IPv6)
if NFTMode() {
ip := "ip"
if enableIPv6 {
ip = "ip6"
}
felixes[0].Exec("nft", "delete", "element", ipv, "calico", "cali40all-vxlan-net", fmt.Sprintf("{ %s }", felixes[2].IP))
} else {
felixes[0].Exec("ipset", "del", "cali40all-vxlan-net", felixes[2].IP)
if enableIPv6 {
felixes[0].Exec("ipset", "del", "cali60all-vxlan-net", felixes[2].IPv6)
}
}

cc.ExpectSome(w[0], w[1])
Expand Down

0 comments on commit a6b4595

Please sign in to comment.