mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-05-28 04:04:39 -04:00
Merge pull request #45856 from shyamjvs/save-iptables
Automatic merge from submit-queue Make fake iptables' Save operation more realistic Ref https://github.com/kubernetes/kubernetes/pull/45622#issuecomment-301624384 (2nd point) This would make fake IPtables actually return the iptable contents it stores. cc @kubernetes/sig-scalability-misc @wojtek-t
This commit is contained in:
commit
c5e9031d7d
1 changed files with 4 additions and 2 deletions
|
|
@ -72,8 +72,10 @@ func (*FakeIPTables) IsIpv6() bool {
|
|||
return false
|
||||
}
|
||||
|
||||
func (*FakeIPTables) Save(table iptables.Table) ([]byte, error) {
|
||||
return make([]byte, 0), nil
|
||||
func (f *FakeIPTables) Save(table iptables.Table) ([]byte, error) {
|
||||
lines := make([]byte, len(f.Lines))
|
||||
copy(lines, f.Lines)
|
||||
return lines, nil
|
||||
}
|
||||
|
||||
func (*FakeIPTables) SaveAll() ([]byte, error) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue