[PR #862] [MERGED] Fix prefix length comparison bug in AutoApprovers route evaluation #1694

Closed
opened 2025-12-29 02:31:15 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/862
Author: @tsujamin
Created: 10/15/2022
Status: Merged
Merged: 11/1/2022
Merged by: @kradalby

Base: mainHead: autoapprovers-prefix-approval-bug


📝 Commits (3)

  • b673c5e check for subprefix approval in TestAutoApproveRoutes
  • ef5fe7f fix route and autoapproved route prefix comparison
  • 348ffdf Merge branch 'main' into autoapprovers-prefix-approval-bug

📊 Changes

3 files changed (+4 additions, -2 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 acls_types.go (+1 -1)
📝 machine_test.go (+2 -1)

📄 Description

  • read the CONTRIBUTING guidelines
  • raised a GitHub issue or discussed it on the projects chat beforehand
  • added unit tests
  • added integration tests
  • updated documentation if needed
  • updated CHANGELOG.md

Fixes a bug raised by @samcday in #763 where a subprefix (10.0.1.0/24) of an autoApproved route (10.0.0.0/8) wasn't being approved due to an incorrect comparison of their prefix lengths. The corresponding unit test has been modified to capture this regression.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/juanfont/headscale/pull/862 **Author:** [@tsujamin](https://github.com/tsujamin) **Created:** 10/15/2022 **Status:** ✅ Merged **Merged:** 11/1/2022 **Merged by:** [@kradalby](https://github.com/kradalby) **Base:** `main` ← **Head:** `autoapprovers-prefix-approval-bug` --- ### 📝 Commits (3) - [`b673c5e`](https://github.com/juanfont/headscale/commit/b673c5e32bcb681ae37a1ce898d50af3329ded0b) check for subprefix approval in TestAutoApproveRoutes - [`ef5fe7f`](https://github.com/juanfont/headscale/commit/ef5fe7ffdb61072c66afbe9966810e6565946648) fix route and autoapproved route prefix comparison - [`348ffdf`](https://github.com/juanfont/headscale/commit/348ffdff31d28830ea6334052a7d98723d49d795) Merge branch 'main' into autoapprovers-prefix-approval-bug ### 📊 Changes **3 files changed** (+4 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `acls_types.go` (+1 -1) 📝 `machine_test.go` (+2 -1) </details> ### 📄 Description - [X] read the [CONTRIBUTING guidelines](README.md#contributing) - [ ] raised a GitHub issue or discussed it on the projects chat beforehand - [X] added unit tests - [ ] added integration tests - [X] updated documentation if needed - [X] updated CHANGELOG.md Fixes a bug raised by @samcday in #763 where a subprefix (`10.0.1.0/24`) of an autoApproved route (`10.0.0.0/8`) wasn't being approved due to an incorrect comparison of their prefix lengths. The corresponding unit test has been modified to capture this regression. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 02:31:15 +01:00
adam closed this issue 2025-12-29 02:31:15 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#1694