Repository navigation
Conversation
doctor reports a firewall item when UFW is active and enforcing and its rules lack the receiver's; install-driver adds the rule unless it is known to be there; the panel asks doctor when Omdrop turns on and offers the fix. Both stacks, as an agreed exception: omdrop-owl runs the bash. Refs #52
[Medium impact] The PR appears safe to merge; the previous false-warning finding is addressed. SummaryAdds a UFW warning to
Reviews (2) · Last reviewed commit: "Don't report a firewall that admits the ..." · Reviewed by Greptile |
The firewall item now needs UFW's default incoming policy to drop or reject, and no allow or limit rule that could admit TCP 8771 on awdl0. Broader rules, such as a port list or range, any port, or any interface, count, and rule addresses aren't compared. Raised by Greptile on #88.
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.
Fixes the last part of #52. With UFW enforcing and no rule for the receiver, Apple devices find this computer and every connection to TCP 8771 is dropped, while
omdrop doctorand the panel show nothing wrong. Thanks to @riegojerey for the report and the diagnosis.Both stacks change, omdrop-core and the bash, as an agreed exception to the Rust-only rule: omdrop-owl runs the bash until it ships core's hooks, and this failure is silent.
doctor: reports afirewallitem, last, when UFW is active and enforcing (ENABLED=yes;ufw.servicestays active afterufw disable), drops incoming traffic by default (DEFAULT_INPUT_POLICYin/etc/default/ufw), and no allow or limit rule in/etc/ufw/user6.rulescould admit TCP 8771 onawdl0. A broader rule, such asufw allow 8771/tcp,ufw allow in on awdl0or a port range, counts. Rule addresses aren't compared, so a rule that might match counts as one that does. Reading those files needs no root; when one can't be read, nothing is reported.install-driver: adds the rule whenever UFW is active and the rule isn't known to be there, and no longer when it is. With everything else current, it opens a terminal for the rule alone; before, bash said "Nothing to do" and core re-added it every time.firewalljoins the plugin's reserved item IDs, so a backend'sfirewallitem shows asbackend-firewall.doctoronly while unusable, and a machine in this state looks healthy. It now also asks each time Omdrop turns on, shows the firewall sentence while receiving, and offers "Add the firewall rule", which runsinstall-driver.docs/radio-backend.md(item IDs) and the README's Privileges section.Verified:
install-driverwith the rule absent, unknown and present./etc/ufwand against a copy without the rule: no item and "Nothing to do" with the real one; the item and a firewall-only terminal (launcher stubbed) with the copy.OMDROP_IMPLEMENTATION=python: 313 tests OK.cargo test --locked --workspace: 473 passed.fmt --check, clippy,cargo +1.88 checkandomarchy-plugin-validateare clean.qmllint Panel.qml: the same warnings before and after. The panel change hasn't been run in a live shell.@riegojerey, could you please test this on your T480? With UFW on, remove the rule (
omdrop firewall remove);omdrop doctorshould report it, and the panel should show it with its button once Omdrop is on.