-
Notifications
You must be signed in to change notification settings - Fork 1
Update nft rules to block all protocols when no voucher #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Unable to trigger custom agent "Code Reviewer"You have run out of credits 😔 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've got 2 comments for you to consider
The PR title and description are not accurate. Here are my suggestions:
Proposed title: Fix nftables rules to block all protocols for unauthorized devices and remove legacy iptables code
Proposed description:
Updates the captive portal script to use nftables instead of iptables for blocking unauthorized devices. Adds a comprehensive drop rule to block all protocols when no voucher is present, and removes commented legacy iptables code. Note: Contains a critical typo in the nftables table name that needs to be addressed before merging.
Did you know we can integrate this feedback directly into 50+ IDEs? Get setup in just one command
| nft add chain inet pirania prerouting { type nat hook prerouting priority 0 \; } | ||
| nft add chain inet pirania input { type filter hook input priority 0 \; } | ||
| nft add chain inet pirania forward { type filter hook forward priority 0 \; } | ||
| nft add chain inet pireania forward { type filter hook forward priority 0 \; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in table name: 'pireania' should be 'pirania' to match the table created on line 25. This will cause the forward chain to be created in a non-existent table, breaking the firewall rules.
Why did I show this?
Category: bug
Comment Quality: high
Based on general best practices
Tools used:
search_in_file,{'pattern': 'def .*', 'file_path': 'packages/pirania/files/usr/bin/captive-portal'}get_file_lines,{'start_line': 1, 'end_line': 114, 'file_path': '/etc/config/pirania'}search_in_file,{'pattern': 'pirania.*uci', 'file_path': 'packages/pirania/files/usr/bin/captive-portal'}search_in_file,{'pattern': 'pirania.*uci', 'file_path': 'packages/pirania/files/usr/bin/captive-portal'}
qodo-free-for-open-source-projects
bot
commented
Jan 20, 2026
•
edited by qodo-code-review
bot
Loading
edited by qodo-code-review
bot
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||||
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||||
qodo-free-for-open-source-projects
bot
commented
Jan 20, 2026
•
edited by qodo-code-review
bot
Loading
edited by qodo-code-review
bot
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||
- Fix typo: 'pireania' -> 'pirania' in forward chain definition - Add counter and log prefix "DROP-UNAUTH" to catch-all drop rule - Update comment to better describe the rule's purpose
PR Type
Bug fix
Description
Fix typo in table name from 'pirania' to 'pireania' in forward chain
Remove commented-out legacy iptables code and unused rules
Add default drop rule for unauthorized MAC addresses
Clean up whitespace and formatting inconsistencies
Diagram Walkthrough
File Walkthrough
captive-portal
Fix nftables typo and remove legacy codepackages/pirania/files/usr/bin/captive-portal
'pireania' for forward chain
blocks
default policy