]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commit
(#9364 #10085) Normalise iptables-save to CIDR
authorDan Carley <dan.carley@gmail.com>
Thu, 24 May 2012 18:02:06 +0000 (19:02 +0100)
committerKen Barber <ken@bob.sh>
Sun, 10 Jun 2012 21:04:38 +0000 (22:04 +0100)
commit1131ffe8bf839e59b078021655e3aa985a74be36
tree71bd5b96f90a47a72dd5b54cb3abe54e717699fa
parentdd57ec322c518a6cfea5d53770cc2f97a7c268bd
(#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.
lib/puppet/provider/firewall/iptables.rb
spec/fixtures/iptables/conversion_hash.rb