[PR #2561] [MERGED] policy: reduce routes sent to peers based on packetfilter #2734

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

📋 Pull Request Information

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

Base: mainHead: kradalby/reduce-routes


📝 Commits (10+)

  • 388bf5c notifier: use convenience funcs
  • 0d17cdd policy: reduce routes based on policy
  • a026a9a hsic: more helper methods
  • 3c5e358 policy: more test cases
  • c38667e integration: add route with filter acl integration test
  • 8b11ab3 integration: correct route reduce test, now failing
  • 9b14563 mapper: compare peer routes against node
  • 471ba2e hs: more output to debug strings
  • 399e832 types/node: slice.ContainsFunc
  • 9aaa458 policy: more reduce route test

📊 Changes

16 files changed (+903 additions, -47 deletions)

View changed files

📝 .github/workflows/test-integration.yaml (+1 -0)
📝 CHANGELOG.md (+2 -0)
📝 hscontrol/mapper/mapper.go (+27 -14)
📝 hscontrol/mapper/mapper_test.go (+9 -0)
📝 hscontrol/mapper/tail.go (+6 -6)
📝 hscontrol/mapper/tail_test.go (+11 -3)
📝 hscontrol/notifier/notifier_test.go (+5 -5)
📝 hscontrol/policy/matcher/matcher.go (+16 -0)
📝 hscontrol/policy/pm.go (+3 -2)
📝 hscontrol/policy/policy.go (+21 -3)
📝 hscontrol/policy/policy_test.go (+525 -2)
📝 hscontrol/policy/v2/policy.go (+24 -0)
📝 hscontrol/types/node.go (+19 -4)
📝 integration/control.go (+2 -0)
📝 integration/hsic/hsic.go (+33 -1)
📝 integration/route_test.go (+199 -7)

📄 Description

Fixes #2365


🔄 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/2561 **Author:** [@kradalby](https://github.com/kradalby) **Created:** 5/3/2025 **Status:** ✅ Merged **Merged:** 5/4/2025 **Merged by:** [@kradalby](https://github.com/kradalby) **Base:** `main` ← **Head:** `kradalby/reduce-routes` --- ### 📝 Commits (10+) - [`388bf5c`](https://github.com/juanfont/headscale/commit/388bf5c7b9330129c458f792848227796db80fa7) notifier: use convenience funcs - [`0d17cdd`](https://github.com/juanfont/headscale/commit/0d17cdd8cb6391b42cd882f9d33a2dd6c3d37b2f) policy: reduce routes based on policy - [`a026a9a`](https://github.com/juanfont/headscale/commit/a026a9a7fbe6fdfae0f44756720b33f7278fd865) hsic: more helper methods - [`3c5e358`](https://github.com/juanfont/headscale/commit/3c5e35840bd10cc1c250aea899ee9962259e816f) policy: more test cases - [`c38667e`](https://github.com/juanfont/headscale/commit/c38667e10568431c3127c80007c7b0bd91c3a1c3) integration: add route with filter acl integration test - [`8b11ab3`](https://github.com/juanfont/headscale/commit/8b11ab319d3303aed9727edceb482e1e2deaaf96) integration: correct route reduce test, now failing - [`9b14563`](https://github.com/juanfont/headscale/commit/9b14563617afad2517fa4b75a061958471071169) mapper: compare peer routes against node - [`471ba2e`](https://github.com/juanfont/headscale/commit/471ba2ea30079b4d8cd107ba5858381efa8aeef7) hs: more output to debug strings - [`399e832`](https://github.com/juanfont/headscale/commit/399e832ca1902e15b0d591f8b2517a0dfcd7c3c6) types/node: slice.ContainsFunc - [`9aaa458`](https://github.com/juanfont/headscale/commit/9aaa458ac65258ceed8d4c1ead63cac658d7e21c) policy: more reduce route test ### 📊 Changes **16 files changed** (+903 additions, -47 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/test-integration.yaml` (+1 -0) 📝 `CHANGELOG.md` (+2 -0) 📝 `hscontrol/mapper/mapper.go` (+27 -14) 📝 `hscontrol/mapper/mapper_test.go` (+9 -0) 📝 `hscontrol/mapper/tail.go` (+6 -6) 📝 `hscontrol/mapper/tail_test.go` (+11 -3) 📝 `hscontrol/notifier/notifier_test.go` (+5 -5) 📝 `hscontrol/policy/matcher/matcher.go` (+16 -0) 📝 `hscontrol/policy/pm.go` (+3 -2) 📝 `hscontrol/policy/policy.go` (+21 -3) 📝 `hscontrol/policy/policy_test.go` (+525 -2) 📝 `hscontrol/policy/v2/policy.go` (+24 -0) 📝 `hscontrol/types/node.go` (+19 -4) 📝 `integration/control.go` (+2 -0) 📝 `integration/hsic/hsic.go` (+33 -1) 📝 `integration/route_test.go` (+199 -7) </details> ### 📄 Description Fixes #2365 --- <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:41 +01:00
adam closed this issue 2025-12-29 04:18:41 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2734