diff --git a/pkg/proxy/iptables/proxier.go b/pkg/proxy/iptables/proxier.go index 021f0ef6398..6a34f5b40fc 100644 --- a/pkg/proxy/iptables/proxier.go +++ b/pkg/proxy/iptables/proxier.go @@ -358,11 +358,11 @@ func NewProxier(ipt utiliptables.Interface, } type iptablesJumpChain struct { - table utiliptables.Table - dstChain utiliptables.Chain - sourceChain utiliptables.Chain - comment string - extraArgs []string + table utiliptables.Table + dstChain utiliptables.Chain + srcChain utiliptables.Chain + comment string + extraArgs []string } var iptablesJumpChains = []iptablesJumpChain{ @@ -390,7 +390,7 @@ func CleanupLeftovers(ipt utiliptables.Interface) (encounteredError bool) { "-m", "comment", "--comment", jump.comment, "-j", string(jump.dstChain), ) - if err := ipt.DeleteRule(jump.table, jump.sourceChain, args...); err != nil { + if err := ipt.DeleteRule(jump.table, jump.srcChain, args...); err != nil { if !utiliptables.IsNotFoundError(err) { klog.Errorf("Error removing pure-iptables proxy rule: %v", err) encounteredError = true @@ -679,8 +679,8 @@ func (proxier *Proxier) syncProxyRules() { "-m", "comment", "--comment", jump.comment, "-j", string(jump.dstChain), ) - if _, err := proxier.iptables.EnsureRule(utiliptables.Prepend, jump.table, jump.sourceChain, args...); err != nil { - klog.Errorf("Failed to ensure that %s chain %s jumps to %s: %v", jump.table, jump.sourceChain, jump.dstChain, err) + if _, err := proxier.iptables.EnsureRule(utiliptables.Prepend, jump.table, jump.srcChain, args...); err != nil { + klog.Errorf("Failed to ensure that %s chain %s jumps to %s: %v", jump.table, jump.srcChain, jump.dstChain, err) return } }