Fix icmp for windows
Description
Originally implemented by AlexandreZia and resubmitted here with his permission and minor tweaks by me
Netsh doesn't accept local/remote port flags when adding icmp rule so I've added an icmp? function and checks to exclude them. Added case statement to convert "icmp" to "icmpv4" so we don't need to distinguish between values for Linux/Windows
Issues Resolved
#156
Check List
- [ ] All tests pass. See TESTING.md for details.
- [ ] New functionality includes testing.
- [ ] New functionality has been documented in the README if applicable.
DCO
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or
(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as Indicated in the file; or
(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.
(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.
Signed-off-by: Riverheart
Full disclosure to the maintainers, I'm a noob when it comes to contributing to open source and specifically Chef cookbooks. I tested the code via kitchen/vagrant against the StefanScherer/windows_2019 box after downloading the supermarket version of 'firewall' and copied over the changes for this specific file via the Github interface. Probably not how this process normally goes but not sure how to officially test this either.
As for the other delivery errors, I'm not sure how to resolve those errors. I don't do a lot of work in Ruby y'see >_>
@RiverHeart we still need to properly adopt this into the Sous Chefs so it might be a bit until we can properly review this. Just an FYI.
@ramereth No worries. Appreciate you getting back to me.