summaryrefslogtreecommitdiff
path: root/lib/chef
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef')
-rw-r--r--lib/chef/resource/windows_firewall_rule.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/chef/resource/windows_firewall_rule.rb b/lib/chef/resource/windows_firewall_rule.rb
index 6d89397955..52aa4ac7cd 100644
--- a/lib/chef/resource/windows_firewall_rule.rb
+++ b/lib/chef/resource/windows_firewall_rule.rb
@@ -247,6 +247,8 @@ class Chef
return false unless protocol.start_with?("ICMP")
return false unless (0..255).include?(icmp_type)
+ true
+
elsif icmp_type.is_a?(String)
return false if !protocol.start_with?("ICMP") && icmp_type !~ /^\D+$/
@@ -256,8 +258,7 @@ class Chef
return icmp_type.split(":").all? { |type| (0..255).include?(type.to_i) }
end
- else
- return true
+ true
end
end
end