Skip to content

Commit

Permalink
fix(policy.go): use new utility method ipSetName
Browse files Browse the repository at this point in the history
  • Loading branch information
aauren committed Apr 26, 2024
1 parent c762eaf commit 2c7151b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/controllers/netpol/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -474,10 +474,10 @@ func (npc *NetworkPolicyController) appendRuleToPolicyChain(policyChainName, com
args = append(args, "-m", "comment", "--comment", "\""+comment+"\"")
}
if srcIPSetName != "" {
args = append(args, "-m", "set", "--match-set", npc.ipSetHandlers[ipFamily].Name(srcIPSetName), "src")
args = append(args, "-m", "set", "--match-set", ipSetName(srcIPSetName, ipFamily), "src")
}
if dstIPSetName != "" {
args = append(args, "-m", "set", "--match-set", npc.ipSetHandlers[ipFamily].Name(dstIPSetName), "dst")
args = append(args, "-m", "set", "--match-set", ipSetName(dstIPSetName, ipFamily), "dst")
}
if protocol != "" {
args = append(args, "-p", protocol)
Expand Down

0 comments on commit 2c7151b

Please sign in to comment.