From 91ca9841a96433ad09bd833e2835067fa4a2d342 Mon Sep 17 00:00:00 2001 From: Kristian Feldsam Date: Fri, 23 Jun 2023 22:26:07 +0200 Subject: [PATCH] Fix iptables commands on versions < 1.6.1 and > 1.8.7 Signed-off-by: Kristian Feldsam --- src/vnm_mad/remotes/lib/command.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vnm_mad/remotes/lib/command.rb b/src/vnm_mad/remotes/lib/command.rb index c8b1ee3947..3ef77d8017 100644 --- a/src/vnm_mad/remotes/lib/command.rb +++ b/src/vnm_mad/remotes/lib/command.rb @@ -45,7 +45,7 @@ module VNMMAD iptables_version = Gem::Version.new(stdout.match(regex)[:version]) - if Gem::Version.new('1.6.1') > iptables_version + if Gem::Version.new('1.6.1') > iptables_version || iptables_version > Gem::Version.new('1.8.7') COMMANDS[:iptables] = 'sudo -n iptables -w 3' COMMANDS[:ip6tables] = 'sudo -n ip6tables -w 3' end