Reuse buffers for generated iptables rules

This commit is contained in:
Wojciech Tyczynski
2017-05-18 12:25:10 +02:00
parent 4d29c8608f
commit e3bb755270
2 changed files with 80 additions and 63 deletions

View File

@@ -396,6 +396,10 @@ func NewFakeProxier(ipt utiliptables.Interface) *Proxier {
portMapper: &fakePortOpener{[]*localPort{}},
healthChecker: newFakeHealthChecker(),
iptablesLines: bytes.NewBuffer(nil),
filterChains: bytes.NewBuffer(nil),
filterRules: bytes.NewBuffer(nil),
natChains: bytes.NewBuffer(nil),
natRules: bytes.NewBuffer(nil),
}
}