Skip to content

Commit

Permalink
Merge pull request #76 from chantra/fix_ipv6
Browse files Browse the repository at this point in the history
Fix ipv6 support when using ip-version :both
  • Loading branch information
rtkrruvinskiy committed Oct 24, 2015
2 parents 6bf29e2 + 26dce70 commit 274d6d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions providers/policy.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
action :set do
updated = false
if [:ipv4, :both].include?(new_resource.ip_version)
updated ||= handle_policy(new_resource, "ipv4")
updated |= handle_policy(new_resource, "ipv4")
end
if [:ipv6, :both].include?(new_resource.ip_version)
updated ||= handle_policy(new_resource, "ipv6")
updated |= handle_policy(new_resource, "ipv6")
end
new_resource.updated_by_last_action(updated)
end
Expand Down
4 changes: 2 additions & 2 deletions providers/rule.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
action :append do
updated = false
if [:ipv4, :both].include?(new_resource.ip_version)
updated ||= handle_rule(new_resource, "ipv4")
updated |= handle_rule(new_resource, "ipv4")
end
if [:ipv6, :both].include?(new_resource.ip_version)
updated ||= handle_rule(new_resource, "ipv6")
updated |= handle_rule(new_resource, "ipv6")
end
new_resource.updated_by_last_action(updated)
end
Expand Down

0 comments on commit 274d6d5

Please sign in to comment.