diff --git a/pkg/daemon/gateway_linux.go b/pkg/daemon/gateway_linux.go index 81a54bce0f7..41464f77023 100644 --- a/pkg/daemon/gateway_linux.go +++ b/pkg/daemon/gateway_linux.go @@ -540,7 +540,7 @@ func (c *Controller) setIptables() error { } } - var natPreroutingRules, natPostroutingRules, ovnMasqueradeRules, manglePostrutingRules []util.IPTableRule + var natPreroutingRules, natPostroutingRules, ovnMasqueradeRules, manglePostroutingRules []util.IPTableRule for _, rule := range iptablesRules { if rule.Table == NAT { switch rule.Chain { @@ -556,7 +556,7 @@ func (c *Controller) setIptables() error { } } else if rule.Table == MANGLE { if rule.Chain == OvnPostrouting { - manglePostrutingRules = append(manglePostrutingRules, rule) + manglePostroutingRules = append(manglePostroutingRules, rule) continue } } @@ -597,7 +597,7 @@ func (c *Controller) setIptables() error { return err } - if err = c.updateIptablesChain(ipt, MANGLE, OvnPostrouting, Postrouting, manglePostrutingRules); err != nil { + if err = c.updateIptablesChain(ipt, MANGLE, OvnPostrouting, Postrouting, manglePostroutingRules); err != nil { klog.Errorf("failed to update chain %s/%s: %v", MANGLE, OvnPostrouting, err) return err }