Skip to content

Commit

Permalink
fix(NPC/pod): check drop policy on ipv4 & ipv6
Browse files Browse the repository at this point in the history
Change return to continue so that both IPv4 and IPv6 are checked for
drop policy not just the first one.
  • Loading branch information
aauren committed Oct 7, 2023
1 parent 367aedf commit 0ecb51d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controllers/netpol/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (npc *NetworkPolicyController) syncPodFirewallChains(networkPoliciesInfo []
// This used to be AppendUnique when we were using iptables directly, this checks to make sure we didn't drop
// unmarked for this chain already
if strings.Contains(filterTableRules.String(), strings.Join(args, " ")) {
return
continue
}
filterTableRules.WriteString(strings.Join(args, " "))

Expand Down

0 comments on commit 0ecb51d

Please sign in to comment.