diff --git a/pkg/util/iptables/save_restore.go b/pkg/util/iptables/save_restore.go index b788beb9113..38cc8c6c76f 100644 --- a/pkg/util/iptables/save_restore.go +++ b/pkg/util/iptables/save_restore.go @@ -40,7 +40,7 @@ func GetChainsFromTable(save []byte) map[Chain]struct{} { start := i + 2 save = save[start:] end := bytes.Index(save, []byte(" ")) - if i == -1 { + if end == -1 { // shouldn't happen, but... break }