Skip to content

Commit

Permalink
Fix iptables commands on versions < 1.6.1 and > 1.8.7
Browse files Browse the repository at this point in the history
Signed-off-by: Kristian Feldsam <[email protected]>
  • Loading branch information
feldsam committed Nov 2, 2023
1 parent c461d30 commit 91ca984
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vnm_mad/remotes/lib/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ module VNMNetwork

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
Expand Down

0 comments on commit 91ca984

Please sign in to comment.