# -f requires special matching:
# only replace those -f that are not followed by an l to
# distinguish between -f and the '-f' inside of --tcp-flags.
- values = values.sub(/-f(?!l)(?=.*--comment)/, '-f true')
+ values = values.sub(/\s-f(?!l)(?=.*--comment)/, ' -f true')
else
values = values.sub(/#{resource_map[bool]}/, "#{resource_map[bool]} true")
end
:clamp_mss_to_pmtu => true,
},
},
+ 'mangled_chain_name_with_-f' => {
+ :line => '-A foo-filter -p tcp -m comment --comment "068 chain name containing -f" -j ACCEPT',
+ :params => {
+ :name => '068 chain name containing -f',
+ :action => 'accept',
+ :chain => 'foo-filter',
+ },
+ },
}
# This hash is for testing converting a hash to an argument line.