]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/networking/resources/firewall_rule.rb
Drop unused support for conntrack helpers
[chef.git] / cookbooks / networking / resources / firewall_rule.rb
index 63970e661cbc32fddb8ea337557d4e1b920c0f90..e5f07dca64fbd24866d50e3a1d87f33abc72360c 100644 (file)
@@ -33,7 +33,6 @@ property :dest_ports, :kind_of => [String, Integer, Array]
 property :source_ports, :kind_of => [String, Integer, Array]
 property :rate_limit, :kind_of => String, :default => "-"
 property :connection_limit, :kind_of => [String, Integer], :default => "-"
-property :helper, :kind_of => String, :default => "-"
 
 property :compile_time, TrueClass, :default => true
 
@@ -69,10 +68,7 @@ action_class do
          when "inet6" then "ip6"
          end
 
-    proto = case new_resource.proto
-            when "udp" then "udp"
-            when "tcp", "tcp:syn" then "tcp"
-            end
+    proto = new_resource.proto
 
     if new_resource.source_ports
       rule << "#{proto} sport { #{nftables_source_ports} }"
@@ -98,9 +94,7 @@ action_class do
       rule << "#{ip} daddr { #{addresses} }"
     end
 
-    if new_resource.proto == "tcp:syn"
-      rule << "ct state new"
-    end
+    rule << "ct state new" if new_resource.proto == "tcp"
 
     if new_resource.connection_limit != "-"
       set = "connlimit-#{new_resource.rule}-#{ip}"