]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commitdiff
Add support for ICMPv6 types neighbour-{solicitation,advertisement}
authorPierre GUINOISEAU <pierre@guinoiseau.eu>
Thu, 23 Apr 2015 09:29:30 +0000 (11:29 +0200)
committerPierre GUINOISEAU <pierre@guinoiseau.eu>
Thu, 23 Apr 2015 09:29:30 +0000 (11:29 +0200)
lib/puppet/util/firewall.rb
spec/unit/puppet/util/firewall_spec.rb

index fa81e75ed224695038e693f53ba9879084a4e4ec..5243466beb4ebfb88ca1ee7e898371cdb87c164d 100644 (file)
@@ -34,6 +34,8 @@ module Puppet::Util::Firewall
         when "echo-reply" then "129"
         when "router-solicitation" then "133"
         when "router-advertisement" then "134"
+        when "neighbour-solicitation" then "135"
+        when "neighbour-advertisement" then "136"
         when "redirect" then "137"
         else nil
       end
index 4d6f92c66cfb44e40d9a06249f4295e1bd917d77..18d8af1b58116836b5480e42263edb7740ad1306 100644 (file)
@@ -86,6 +86,8 @@ describe 'Puppet::Util::Firewall' do
       specify { subject.icmp_name_to_number('echo-reply', proto).should == '129' }
       specify { subject.icmp_name_to_number('router-solicitation', proto).should == '133' }
       specify { subject.icmp_name_to_number('router-advertisement', proto).should == '134' }
+      specify { subject.icmp_name_to_number('neighbour-solicitation', proto).should == '135' }
+      specify { subject.icmp_name_to_number('neighbour-advertisement', proto).should == '136' }
       specify { subject.icmp_name_to_number('redirect', proto).should == '137' }
     end
   end