]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commit
(#10164) Reject and document icmp => "any"
authorDan Carley <dan.carley@gmail.com>
Fri, 9 Mar 2012 09:13:33 +0000 (09:13 +0000)
committerDan Carley <dan.carley@gmail.com>
Fri, 9 Mar 2012 10:22:52 +0000 (10:22 +0000)
commit38e0cb2c93b3aecc75afb2935bdca1bd6eac96fe
treecbf646335e33981b63ec71c96b5ebf3f77fb82c1
parent184d77ad5faa38e61c7cf0aca62b5fea7b9e506f
(#10164) Reject and document icmp => "any"

iptables accepts the string "any" as an ICMP type and stores it behind the
scenes as the fake (IANA reserved) numeric 255. This is functionally
equivalent to not specifying an `--icmp-type` argument.

ip6tables didn't carry this "feature" over. Like many other providers, the
matching of any ICMP packet type is only achieved by omitting the
`--icmpv6-type` arugment.

For the purpose of simpler logic and future provider compatibility we
prevent people from using the value "any" and advise them to omit/undefine
the param instead.

Include a test that somewhat duplicates the prevention of invalid strings
but would preserve this behaviour should icmp_name_to_number() ever change.
lib/puppet/type/firewall.rb
spec/unit/puppet/type/firewall_spec.rb