]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commitdiff
(MODULES-1086) toports is not reqired with jump == REDIRECT
authorHunter Haugen <hunter@puppetlabs.com>
Mon, 15 Sep 2014 23:20:09 +0000 (16:20 -0700)
committerHunter Haugen <hunter@puppetlabs.com>
Mon, 15 Sep 2014 23:20:09 +0000 (16:20 -0700)
From the man page for REDIRECT and --to-ports: "This specifies a
destination port or range of ports to use: without this, the destination
port is never altered."

lib/puppet/type/firewall.rb

index 34a5d33a60da4e4382535313e2f8e21d6d824ac5..66f0f0656ace9954b56d656469d864092975b982 100644 (file)
@@ -1090,13 +1090,6 @@ Puppet::Type.newtype(:firewall) do
       end
     end
 
-    if value(:jump).to_s == "REDIRECT"
-      unless value(:toports)
-        self.fail "Parameter jump => REDIRECT missing mandatory toports " \
-          "parameter"
-      end
-    end
-
     if value(:jump).to_s == "MASQUERADE"
       unless value(:table).to_s =~ /nat/
         self.fail "Parameter jump => MASQUERADE only applies to table => nat"