Commit 6fcfbfbc authored by Adam Lewenberg's avatar Adam Lewenberg
Browse files

version 004.011: more @ fixes

parent 50569947
release/004.011 (2015-01-02)
[iptables] Fix @'s in iptables template file rule.erb. (adamhl)
release/004.010 (2014-12-22)
Fix @ in an iptables template file. (adamhl)
......
<%# Generic iptables rule template used by iptables::rule. -%>
# <%= @name %><% if @description != '' then %> -- <%= @description %><% end %>
<% [port].flatten.each do |pt| -%>
<% [@port].flatten.each do |pt| -%>
<% p = (pt != '') ? '--dport ' + pt : '' -%>
<% [source].flatten.each do |src| -%>
<% [protocol].flatten.each do |pr| -%>
<% [@source].flatten.each do |src| -%>
<% [@protocol].flatten.each do |pr| -%>
<% syn = (pr == 'tcp') ? ' --syn' : '' -%>
<% s = (src != '') ? ' -s ' + src : '' -%>
-A INPUT<%= s %> -p <%= pr %> <%= p %><%= syn %> -j <%= target %>
-A INPUT<%= s %> -p <%= pr %> <%= p %><%= syn %> -j <%= @target %>
<% end -%>
<% end -%>
<% end -%>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment