[change] Avoid reserved host-route subnets - #1481
nemesifier merged 2 commits into
Conversation
Host-route subnet division no longer creates a reserved subnet database object for IPv4 /32 and IPv6 /128 rules. Preserve the existing allocation behavior for multi-address subnet divisions. Closes openwisp#1468
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📜 Recent review details⏰ Context from checks skipped due to timeout. (8)
🧰 Additional context used📓 Path-based instructions (1)Flag potential security vulnerabilities Flag obvious performance regressions, such as heavy loops, repeated I/O, or unoptimized queries Flag unused or redundant code Flag outdated or incorrect comments/docstrings Ensure new code handles err...⚙️ CodeRabbit configuration file Files:
🧠 Learnings (1)📚 Learning: 2026-02-17T19:13:10.088ZApplied to files:
🔇 Additional comments (1)
📝 WalkthroughWalkthrough
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to The host-route allocation and reserved-subnet behavior are covered for both IPv4 and IPv6, with no merge-blocking risk identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
|
@coderabbitai full review! |
|
✅ Action performedFull review finished. |
|
Hi @nemesifier, I’m a little confused about the next step in the process for PR #1481 and wanted to ask for your guidance. The PR currently has the required approval and all checks are passing, but GitHub shows that the branch is out of date with the base branch. Since I’m not authorized to merge into I’m honestly a little lost here since this is my first open-source contribution, so it would be really helpful if you could guide me on what I should do next and how this process usually works. Could you please let me know what you would prefer me to do from here? Thanks a lot for your guidance and patience! |
|
Proposed change log entry: |
|
Hi @krrishnaik, Thank you for your interest in contributing to OpenWISP. This pull request has been flagged as invalid because external contributors must target an issue validated by maintainers before requesting review. Please link this pull request to a validated issue by adding If there is no validated issue yet, please open one first and wait for maintainer validation before continuing with this pull request. An issue is considered validated when it is open, has at least one label, has no Please refer to the OpenWISP Contributing Guidelines for more information. Please see the OpenWISP Anti AI Spam Policy. Feel free to join the OpenWISP dev chatroom to coordinate with the development team. Pull requests from external contributors that target an unvalidated issue are flagged as invalid and closed automatically if not resolved within 24 hours. Thank you for your understanding. |
|
Hi @nemesifier, Thank you for reviewing and merging my first contribution! I’m really happy to have gotten my first OpenWISP contribution merged, and the process has made me even more curious about the project. Since this was my first open-source contribution, I’m still trying to understand the workflow and how I can improve as a contributor. I’d really appreciate any guidance you can give me on how to approach future issues and contribute more effectively. I’m also eager to pick up another issue and continue contributing to OpenWISP. Before I do that, I wanted to understand one thing about #1481: after the PR was merged, the I’d really appreciate your guidance, especially since I’m just getting started with open source. Looking forward to contributing more! |
Host-route subnet division no longer creates an additional reserved subnet
database object for IPv4
/32and IPv6/128rules, while preserving theexisting allocation behavior for multi-address subnet divisions.
Checklist
Reference to Existing Issue
Fixes #1468.
Description of Changes
When subnet division provisions a host-route subnet (
/32for IPv4 or/128for IPv6), there is no need to persist a separate reserved subnet because the generated subnet contains only a single host address.This change updates the allocation logic to avoid creating the additional
Reserved Subnetdatabase object for host-route rules, while preserving the existing reserved-subnet behavior for multi-address subnet divisions.Regression coverage was added for both IPv4
/32and IPv6/128provisioning to verify that the expected child subnet and IP address are created without creating aReserved Subnetobject. The subnet-division documentation was also updated to describe this host-route-specific behavior.The changes were verified with the full subnet-division test suite and the repository QA checks. Manual end-to-end verification through the local Django admin confirmed that an IPv4
/32VPN subnet was provisioned as10.0.0.2/32with IP10.0.0.2, while no additionalReserved Subnetobject was created.Screenshot
Before
With the original allocation behavior, provisioning an IPv4
/32host-route created the expected child subnet along with an additionalReserved Subnetdatabase object.After
With the updated allocation behavior, provisioning the IPv4
/32host-route creates the expected child subnet without creating the additionalReserved Subnetdatabase object.