[PR #3438] [MERGED] Add flow userspace counters #20416

Closed
opened 2026-08-05 05:07:14 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/3438
Author: @lixmal
Created: 3/4/2025
Status: Merged
Merged: 3/6/2025
Merged by: @lixmal

Base: feature/flowHead: flow-userspace-counters


📝 Commits (10+)

📊 Changes

21 files changed (+307 additions, -232 deletions)

View changed files

📝 client/firewall/uspfilter/conntrack/common.go (+20 -7)
📝 client/firewall/uspfilter/conntrack/common_test.go (+4 -4)
📝 client/firewall/uspfilter/conntrack/icmp.go (+30 -14)
📝 client/firewall/uspfilter/conntrack/icmp_test.go (+3 -3)
📝 client/firewall/uspfilter/conntrack/tcp.go (+25 -16)
📝 client/firewall/uspfilter/conntrack/tcp_test.go (+28 -28)
📝 client/firewall/uspfilter/conntrack/udp.go (+25 -16)
📝 client/firewall/uspfilter/conntrack/udp_test.go (+7 -7)
📝 client/firewall/uspfilter/forwarder/icmp.go (+20 -35)
📝 client/firewall/uspfilter/forwarder/tcp.go (+25 -7)
📝 client/firewall/uspfilter/forwarder/udp.go (+25 -8)
📝 client/firewall/uspfilter/tracer.go (+2 -2)
📝 client/firewall/uspfilter/uspfilter.go (+25 -20)
📝 client/firewall/uspfilter/uspfilter_bench_test.go (+40 -40)
📝 client/firewall/uspfilter/uspfilter_filter_test.go (+2 -2)
📝 client/firewall/uspfilter/uspfilter_test.go (+7 -7)
📝 client/iface/device/device_filter.go (+4 -4)
📝 client/iface/device/device_filter_test.go (+2 -2)
📝 client/iface/mocks/filter.go (+8 -8)
📝 client/internal/dns/server_test.go (+1 -1)

...and 1 more files

📄 Description

Describe your changes

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

🔄 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/netbirdio/netbird/pull/3438 **Author:** [@lixmal](https://github.com/lixmal) **Created:** 3/4/2025 **Status:** ✅ Merged **Merged:** 3/6/2025 **Merged by:** [@lixmal](https://github.com/lixmal) **Base:** `feature/flow` ← **Head:** `flow-userspace-counters` --- ### 📝 Commits (10+) - [`c380048`](https://github.com/netbirdio/netbird/commit/c380048f145902251687a413fa819c5e80cba2b9) Replace net.IP with netip.Addr and improve locking - [`c785560`](https://github.com/netbirdio/netbird/commit/c7855608c7815f2b3eef3548e674a8635aeea0e8) Fix 4in6 - [`251115c`](https://github.com/netbirdio/netbird/commit/251115c15c112674766e8cab51961323ab6540f5) Replace string maps with netip.Addr - [`6d1fd02`](https://github.com/netbirdio/netbird/commit/6d1fd0281c2595061f5668bd71f354c54be7f0b4) Use conn keys directly - [`6aa58c7`](https://github.com/netbirdio/netbird/commit/6aa58c76205917d1086cabb89b345797e15c33ca) Fix windows build - [`82ead57`](https://github.com/netbirdio/netbird/commit/82ead57d2a4e972a0be5a1e4efc14a1fdcf3c5e3) Add userspace counters - [`50f805b`](https://github.com/netbirdio/netbird/commit/50f805b56ced785ec137e41c9d8c67accb51f1f8) Fix mocks - [`6f87937`](https://github.com/netbirdio/netbird/commit/6f87937e3cd4fc97707acc35be58dc9e889b2f4e) Fix device test - [`8ea247d`](https://github.com/netbirdio/netbird/commit/8ea247d1beb450dc70cc84db40bfbd792baa75f7) Fix dns test - [`9aff097`](https://github.com/netbirdio/netbird/commit/9aff097b36dc4b86cbcfd3fda4424dd8a4c43e6a) Merge branch 'feature/flow' into flow-userspace-counters ### 📊 Changes **21 files changed** (+307 additions, -232 deletions) <details> <summary>View changed files</summary> 📝 `client/firewall/uspfilter/conntrack/common.go` (+20 -7) 📝 `client/firewall/uspfilter/conntrack/common_test.go` (+4 -4) 📝 `client/firewall/uspfilter/conntrack/icmp.go` (+30 -14) 📝 `client/firewall/uspfilter/conntrack/icmp_test.go` (+3 -3) 📝 `client/firewall/uspfilter/conntrack/tcp.go` (+25 -16) 📝 `client/firewall/uspfilter/conntrack/tcp_test.go` (+28 -28) 📝 `client/firewall/uspfilter/conntrack/udp.go` (+25 -16) 📝 `client/firewall/uspfilter/conntrack/udp_test.go` (+7 -7) 📝 `client/firewall/uspfilter/forwarder/icmp.go` (+20 -35) 📝 `client/firewall/uspfilter/forwarder/tcp.go` (+25 -7) 📝 `client/firewall/uspfilter/forwarder/udp.go` (+25 -8) 📝 `client/firewall/uspfilter/tracer.go` (+2 -2) 📝 `client/firewall/uspfilter/uspfilter.go` (+25 -20) 📝 `client/firewall/uspfilter/uspfilter_bench_test.go` (+40 -40) 📝 `client/firewall/uspfilter/uspfilter_filter_test.go` (+2 -2) 📝 `client/firewall/uspfilter/uspfilter_test.go` (+7 -7) 📝 `client/iface/device/device_filter.go` (+4 -4) 📝 `client/iface/device/device_filter_test.go` (+2 -2) 📝 `client/iface/mocks/filter.go` (+8 -8) 📝 `client/internal/dns/server_test.go` (+1 -1) _...and 1 more files_ </details> ### 📄 Description ## Describe your changes ## Issue ticket number and link ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [x] Is a feature enhancement - [ ] It is a refactor - [ ] Created tests that fail without the change (if possible) - [ ] Extended the README / documentation, if necessary --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 05:07:14 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#20416