Skip to content

Commit

Permalink
Restore *filter table for ipvs
Browse files Browse the repository at this point in the history
Resolve: #68194
  • Loading branch information
alexjx committed Sep 18, 2018
1 parent dd2a1e5 commit 4ca62e4
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 4ca62e4

Please sign in to comment.