From a82ee6d4168fc1659c69ab0710cd51de5c545ef1 Mon Sep 17 00:00:00 2001 From: npolshakova Date: Tue, 28 Nov 2023 12:49:32 -0500 Subject: [PATCH] fix error check --- pkg/util/iptables/save_restore.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }