puppetlabs/puppetlabs-firewall — pull request #81 by dcarley (2012-05-28 16:59:30+00:00)
Title: (#9364 #10085) Normalise iptables-save to CIDR

Normalise all source and destination addresses to CIDR notation as they are
reverse-parsed from iptables-save. This ensures that they match how
addresses are forward-parsed by the type with Util::Firewall.host_to_ip.

Fixes two issues which both principally affect EL5 and may affect other
providers in the future.

Issue #9364:
Single IP addresses not representing a range should be qualified in CIDR
notation with /32 for IPv4 and /128 for IPv6.

Issue #10085:
Addresses with a dotted quad netmask representing a range should be
qualifed with in CIDR notation instead.

--

This supersedes two existing PRs:

- PR #53 (issue #10085) didn't appear to work and I was uneasy about modifying the behaviour of `Util::IPCidr`.
- PR #76 (issue #9364) didn't handle IPv6 addresses.