end
end
+ newproperty(:proto) do
+ desc <<-PUPPETCODE
+ The specific protocol to match for this rule.
+ PUPPETCODE
+
+ 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'
+ end
+
newproperty(:sport, array_matching: :all) do
desc <<-PUPPETCODE
The source port to match for this filter (if the protocol supports
PUPPETCODE
munge do |value|
- @resource.string_to_port(value, :proto)
+ @resource.string_to_port(value, @resource[:proto])
end
def to_s?(value)
PUPPETCODE
munge do |value|
- @resource.string_to_port(value, :proto)
+ @resource.string_to_port(value, @resource[:proto])
end
def to_s?(value)
end
munge do |value|
- @resource.string_to_port(value, :proto)
+ @resource.string_to_port(value, @resource[:proto])
end
def to_s?(value)
}.flatten)
end
- newproperty(:proto) do
- desc <<-PUPPETCODE
- The specific protocol to match for this rule.
- PUPPETCODE
-
- 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'
- end
-
# tcp-specific
newproperty(:mss) do
desc <<-PUPPETCODE