[BUG] win_firewall.add_rule localport parameter needs to be optional
Open
@xeacott is already working on this.
Since Jul 22, 2021.
bug
Confirmed
State-Module
Windows
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 5.6k
- Avg merge
- 2d 44m
- Merged PRs (30d)
- 80
Description
Description
trying to set a win_firewall state with protocol: any, localport: any:
attempt 1
allow_myservice:
win_firewall.add_rule:
- name: myservice
- dir: in
- protocol: any
- remoteip: "192.168.100.100"
- action: allow
result 1
error about localport parameter being required
this seems to be a requirement just in salt, but the underlying netsh command accepts protocol: any, without the localport parameter
attempt 2
allow_myservice:
win_firewall.add_rule:
- name: myservice
- dir: in
- protocol: any
- localport: 0-65535
- remoteip: "192.168.100.100"
- action: allow
result 2
error about localport parameter only being allowed if the protocol is TCP or UDP
attempt 3
allow_myservice:
win_firewall.add_rule:
- name: myservice
- dir: in
- localport: any
- remoteip: "192.168.100.100"
- action: allow
result 3
by omitting protocol, it sets protocol to TCP
localport parameter requirement also causes issues when you want to allow just a protocol like icmpv4.
Setup
3003.1 saltmaster/saltminion
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.