Open DNS discovery ports - #32
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
It can open firewall ports even when the announce daemon isn’t actually present/usable, and the new firewall-detection/port-parsing logic lacks test coverage in the existing shellspec suite.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds automatic firewall port opening for DNS discovery/announcement methods so that mDNS and NetBIOS advertisements work when a supported firewall is installed and running.
Changes:
- Extend the announce step to open mDNS (5353/udp) and NetBIOS (137/udp, 138/udp) ports during install when an active firewall is detected.
- Introduce firewall detection (
ufw,firewalld,nftables) and a genericprimer_net_port_allowhelper to apply port rules.
File summaries
| File | Description |
|---|---|
| libexec/steps/announce.sh | Adds per-method port lists and calls into primer_net_port_allow during install when a firewall is active. |
| libexec/net.sh | Implements active firewall detection and port opening across ufw/firewalld/nftables. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automatically open NetBIOS and mDNS ports when a firewall is installed and running.