ipvs: remove duplicated masq rules

Duplicated masq rules are created by current implementation:

    -A KUBE-NODE-PORT -m comment --comment "mark MASQ for
externaltrafficpolicy=cluster" -j KUBE-MARK-MASQ
    -A KUBE-NODE-PORT -j KUBE-MARK-MASQ

The last one is always there. So the one inside if statement could
just be removed.
pull/8/head
Hong Zhiguo 2018-06-27 22:17:21 +08:00
parent 24ab69d358
commit 0e6f0736ce
1 changed files with 0 additions and 7 deletions

View File

@ -1283,13 +1283,6 @@ func (proxier *Proxier) writeIptablesRules() {
)
writeLine(proxier.natRules, append(args, "-j", "ACCEPT")...)
}
// mark masq for others
args = append(args[:0],
"-A", string(KubeNodePortChain),
"-m", "comment", "--comment",
fmt.Sprintf(`"mark MASQ for externaltrafficpolicy=cluster"`),
)
writeLine(proxier.natRules, append(args, "-j", string(KubeMarkMasqChain))...)
}
// mark masq for KUBE-NODE-PORT