Skip to content

Commit e36ecf4

Browse files
author
Max Vozeler
committed
Fix mangling of chain names that contain -f
1 parent d1f0347 commit e36ecf4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/puppet/provider/firewall/iptables.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ def self.rule_to_hash(line, table, counter)
356356
# -f requires special matching:
357357
# only replace those -f that are not followed by an l to
358358
# distinguish between -f and the '-f' inside of --tcp-flags.
359-
values = values.sub(/-f(?!l)(?=.*--comment)/, '-f true')
359+
values = values.sub(/\s-f(?!l)(?=.*--comment)/, ' -f true')
360360
else
361361
values = values.sub(/#{resource_map[bool]}/, "#{resource_map[bool]} true")
362362
end

0 commit comments

Comments
 (0)