[PR #2556] [MERGED] policy/matcher: fix bug using contains instead of overlap #2728

Closed
opened 2025-12-29 04:18:40 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/2556
Author: @kradalby
Created: 5/2/2025
Status: Merged
Merged: 5/2/2025
Merged by: @kradalby

Base: mainHead: kradalby/32-in-16-subnetrouter


📝 Commits (3)

  • 15d9ef4 policy/matcher: slices.ContainsFunc
  • 06c5390 policy/matcher: slices.ContainsFunc, correct contains vs overlap
  • fbd3049 policy: add tests to validate fix for 2181

📊 Changes

2 files changed (+110 additions, -30 deletions)

View changed files

📝 hscontrol/policy/matcher/matcher.go (+6 -28)
📝 hscontrol/policy/policy_test.go (+104 -2)

📄 Description

Fixes #2181


🔄 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/2556 **Author:** [@kradalby](https://github.com/kradalby) **Created:** 5/2/2025 **Status:** ✅ Merged **Merged:** 5/2/2025 **Merged by:** [@kradalby](https://github.com/kradalby) **Base:** `main` ← **Head:** `kradalby/32-in-16-subnetrouter` --- ### 📝 Commits (3) - [`15d9ef4`](https://github.com/juanfont/headscale/commit/15d9ef481b13c40ef7b56f17635b47605839ec53) policy/matcher: slices.ContainsFunc - [`06c5390`](https://github.com/juanfont/headscale/commit/06c5390d894dcf2798207d8988dd51880e0331c1) policy/matcher: slices.ContainsFunc, correct contains vs overlap - [`fbd3049`](https://github.com/juanfont/headscale/commit/fbd3049e89dd9ad8edf24e737854ffd1767c66a7) policy: add tests to validate fix for 2181 ### 📊 Changes **2 files changed** (+110 additions, -30 deletions) <details> <summary>View changed files</summary> 📝 `hscontrol/policy/matcher/matcher.go` (+6 -28) 📝 `hscontrol/policy/policy_test.go` (+104 -2) </details> ### 📄 Description Fixes #2181 --- <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 04:18:40 +01:00
adam closed this issue 2025-12-29 04:18:40 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2728