Skip to content

Commit

Permalink
Merge pull request #68786 from alexjx/pr/68194
Browse files Browse the repository at this point in the history
Restore *filter table for ipvs
  • Loading branch information
k8s-ci-robot authored Sep 19, 2018
2 parents 9228bec + 4ca62e4 commit e3dbad3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/proxy/ipvs/proxier.go
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,8 @@ func (proxier *Proxier) syncProxyRules() {
// This is to avoid memory reallocations and thus improve performance.
proxier.natChains.Reset()
proxier.natRules.Reset()
proxier.filterChains.Reset()
proxier.filterRules.Reset()

// Write table headers.
writeLine(proxier.filterChains, "*filter")
Expand Down Expand Up @@ -1131,6 +1133,8 @@ func (proxier *Proxier) syncProxyRules() {
proxier.iptablesData.Reset()
proxier.iptablesData.Write(proxier.natChains.Bytes())
proxier.iptablesData.Write(proxier.natRules.Bytes())
proxier.iptablesData.Write(proxier.filterChains.Bytes())
proxier.iptablesData.Write(proxier.filterRules.Bytes())

glog.V(5).Infof("Restoring iptables rules: %s", proxier.iptablesData.Bytes())
err = proxier.iptables.RestoreAll(proxier.iptablesData.Bytes(), utiliptables.NoFlushTables, utiliptables.RestoreCounters)
Expand Down

0 comments on commit e3dbad3

Please sign in to comment.