Skip to content

Commit

Permalink
Merge pull request #27 from webalexeu/fix_protocol_any
Browse files Browse the repository at this point in the history
Fix protocol issue
  • Loading branch information
webalexeu authored Dec 14, 2022
2 parents caba557 + cf196e5 commit d54dfe2
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

All notable changes to this project will be documented in this file.

## Release 1.4.1 (2022-12-14)

[Full Changelog](https://github.com/webalexeu/puppet-windows_firewall/compare/v1.4.0...v1.4.1)

**Features**

**Bugfixes**

- [Cannot use 'any' for protocol parameter](https://github.com/webalexeu/puppet-windows_firewall/issues/26)

**Known Issues**

## Release 1.4.0 (2022-12-07)

[Full Changelog](https://github.com/webalexeu/puppet-windows_firewall/compare/v1.3.4...v1.4.0)
Expand All @@ -16,6 +28,8 @@ All notable changes to this project will be documented in this file.

**Known Issues**

- Cannot use 'any' for protocol parameter

## Release 1.3.4 (2022-08-23)

[Full Changelog](https://github.com/webalexeu/puppet-windows_firewall/compare/v1.3.3...v1.3.4)
Expand Down
5 changes: 4 additions & 1 deletion lib/puppet/type/windows_firewall_rule.rb
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,15 @@ def insync?(is)

newproperty(:protocol) do
desc 'the protocol the rule targets'

# Also accept 0-255 :/
newvalues(:tcp, :udp, :icmpv4, :icmpv6, /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/)
newvalues(:any, :tcp, :udp, :icmpv4, :icmpv6, /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/)
isrequired
def insync?(is)
is.to_s == should.to_s
end

defaultto :any
end

newproperty(:icmp_type) do
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "webalex-windows_firewall",
"version": "1.4.0",
"version": "1.4.1",
"author": "webalex",
"summary": "Manage the windows firewall with Puppet",
"license": "Apache-2.0",
Expand Down

0 comments on commit d54dfe2

Please sign in to comment.