mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 00:07:50 +00:00
Make fake iptables' Save operation more realistic
This commit is contained in:
parent
f038c5494e
commit
da924fc337
@ -72,8 +72,10 @@ func (*FakeIPTables) IsIpv6() bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
func (*FakeIPTables) Save(table iptables.Table) ([]byte, error) {
|
func (f *FakeIPTables) Save(table iptables.Table) ([]byte, error) {
|
||||||
return make([]byte, 0), nil
|
lines := make([]byte, len(f.Lines))
|
||||||
|
copy(lines, f.Lines)
|
||||||
|
return lines, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (*FakeIPTables) SaveAll() ([]byte, error) {
|
func (*FakeIPTables) SaveAll() ([]byte, error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user