Skip to content

Commit 564fb4a

Browse files
nabertrandpraj1001
authored andcommitted
Prevent sources with zero prefix length being applied every agent run
1 parent ad47cf9 commit 564fb4a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/puppet/provider/firewall/firewall.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,8 +325,8 @@ def delete(context, name, is)
325325
def insync?(context, _name, property_name, is_hash, should_hash)
326326
context.debug("Checking whether '#{property_name}' is out of sync")
327327

328-
# If either value is nil, no custom logic is required
329-
return nil if is_hash[property_name].nil? || should_hash[property_name].nil?
328+
# If either value is nil, no custom logic is required unless property is source or destination
329+
return nil if (is_hash[property_name].nil? || should_hash[property_name].nil?) && ! [:source, :destination].include?(property_name)
330330

331331
case property_name
332332
when :protocol

0 commit comments

Comments
 (0)