mirror of
https://github.com/cloudnativelabs/kube-router.git
synced 2025-10-08 08:21:28 +02:00
switch --set to less ambiguous --match-set (#874)
While --set is still ambiguous it can clash with other module options, so it is better to be more specific and use the --match-set option. This also more closely aligns with all other areas of the code that already use --match-set. From iptables-extensions man page: The option --match-set can be replaced by --set if that does not clash with an option of other extensions.
This commit is contained in:
parent
2c4911b9a9
commit
19e563701e
@ -667,10 +667,10 @@ func (npc *NetworkPolicyController) appendRuleToPolicyChain(iptablesCmdHandler *
|
|||||||
args = append(args, "-m", "comment", "--comment", comment)
|
args = append(args, "-m", "comment", "--comment", comment)
|
||||||
}
|
}
|
||||||
if srcIpSetName != "" {
|
if srcIpSetName != "" {
|
||||||
args = append(args, "-m", "set", "--set", srcIpSetName, "src")
|
args = append(args, "-m", "set", "--match-set", srcIpSetName, "src")
|
||||||
}
|
}
|
||||||
if dstIpSetName != "" {
|
if dstIpSetName != "" {
|
||||||
args = append(args, "-m", "set", "--set", dstIpSetName, "dst")
|
args = append(args, "-m", "set", "--match-set", dstIpSetName, "dst")
|
||||||
}
|
}
|
||||||
if protocol != "" {
|
if protocol != "" {
|
||||||
args = append(args, "-p", protocol)
|
args = append(args, "-p", protocol)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user