From b3c2888e717e7fd25674c3d3e7835bcde9839b5a Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Thu, 3 Jan 2019 10:23:20 -0800 Subject: [PATCH] kube-proxy: rename internal field for clarity --- pkg/proxy/iptables/proxier.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/proxy/iptables/proxier.go b/pkg/proxy/iptables/proxier.go index 4734de066d5..a22e39bf1e9 100644 --- a/pkg/proxy/iptables/proxier.go +++ b/pkg/proxy/iptables/proxier.go @@ -359,7 +359,7 @@ func NewProxier(ipt utiliptables.Interface, type iptablesJumpChain struct { table utiliptables.Table - chain utiliptables.Chain + dstChain utiliptables.Chain sourceChain utiliptables.Chain comment string extraArgs []string @@ -388,7 +388,7 @@ func CleanupLeftovers(ipt utiliptables.Interface) (encounteredError bool) { for _, chain := range append(iptablesJumpChains, iptablesCleanupOnlyChains...) { args := append(chain.extraArgs, "-m", "comment", "--comment", chain.comment, - "-j", string(chain.chain), + "-j", string(chain.dstChain), ) if err := ipt.DeleteRule(chain.table, chain.sourceChain, args...); err != nil { if !utiliptables.IsNotFoundError(err) { @@ -671,16 +671,16 @@ func (proxier *Proxier) syncProxyRules() { // Create and link the kube chains. for _, chain := range iptablesJumpChains { - if _, err := proxier.iptables.EnsureChain(chain.table, chain.chain); err != nil { + if _, err := proxier.iptables.EnsureChain(chain.table, chain.dstChain); err != nil { klog.Errorf("Failed to ensure that %s chain %s exists: %v", chain.table, kubeServicesChain, err) return } args := append(chain.extraArgs, "-m", "comment", "--comment", chain.comment, - "-j", string(chain.chain), + "-j", string(chain.dstChain), ) if _, err := proxier.iptables.EnsureRule(utiliptables.Prepend, chain.table, chain.sourceChain, args...); err != nil { - klog.Errorf("Failed to ensure that %s chain %s jumps to %s: %v", chain.table, chain.sourceChain, chain.chain, err) + klog.Errorf("Failed to ensure that %s chain %s jumps to %s: %v", chain.table, chain.sourceChain, chain.dstChain, err) return } }