]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commitdiff
Update firewall.rb
authorpellisesol <55718611+pellisesol@users.noreply.github.com>
Fri, 2 Oct 2020 17:06:33 +0000 (12:06 -0500)
committerGitHub <noreply@github.com>
Fri, 2 Oct 2020 17:06:33 +0000 (12:06 -0500)
On Gentoo using 'vrrp' sets the proto to 112 but when puppet runs it interprets 112 as 'carp' which it then corrects to 'vrrp' which is still 112. So it redoes the rule every time puppet runs. Adding carp here allows carp to be set as a valid option which removes the loop.

lib/puppet/type/firewall.rb

index 74db820c5f1ce202b6711b7facc465edfe0d5220..241a285673f3b05c29406912cb7f98293aca3a91 100644 (file)
@@ -549,7 +549,7 @@ Puppet::Type.newtype(:firewall) do
       The specific protocol to match for this rule.
     PUPPETCODE
 
-    newvalues(*[:ip, :tcp, :udp, :icmp, :"ipv6-icmp", :esp, :ah, :vrrp, :igmp, :ipencap, :ipv4, :ipv6, :ospf, :gre, :cbt, :sctp, :pim, :all].map { |proto|
+    newvalues(*[:ip, :tcp, :udp, :icmp, :"ipv6-icmp", :esp, :ah, :vrrp, :carp, :igmp, :ipencap, :ipv4, :ipv6, :ospf, :gre, :cbt, :sctp, :pim, :all].map { |proto|
       [proto, "! #{proto}".to_sym]
     }.flatten)
     defaultto 'tcp'