Skip to content

Commit 70491be

Browse files
Update the comments to match the iptables selection logic (istio#57876)
The comments describing the iptables selection logic don’t match the actual implementation. This PR fixes that. Signed-off-by: Sridhar Gaddam <[email protected]>
1 parent 9c2ba52 commit 70491be

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

tools/istio-iptables/pkg/dependencies/implementation.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,10 @@ const (
126126
// We are using our local binaries to update host rules, and we must pick the right match.
127127
//
128128
// Basic selection logic is as follows:
129-
// 1. see if we have `nft` binary set in our $PATH
130-
// 2. see if we have existing rules in `nft` in our netns
131-
// 3. If so, use `nft` binary set
132-
// 4. Otherwise, see if we have `legacy` binary set, and use that.
133-
// 5. Otherwise, see if we have `iptables` binary set, and use that (detecting whether it's nft or legacy).
129+
// 1. Check if we have `iptables-legacy` binary in our $PATH and if it has any existing rules in the netns
130+
// 2. If so, use `legacy` binary immediately
131+
// 3. Otherwise, check if we have `iptables-nft` binary in our $PATH and if so, use `nft` binary set
132+
// 4. Otherwise, see if we have `iptables` binary set, and use that.
134133
func (r *RealDependencies) DetectIptablesVersion(ipV6 bool) (IptablesVersion, error) {
135134
// Begin detecting
136135
//

0 commit comments

Comments
 (0)