[PR #1620] [MERGED] compile client under freebsd #15658

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

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/1620
Author: @skillcoder
Created: 2/24/2024
Status: Merged
Merged: 5/30/2024
Merged by: @pappz

Base: 0.28.0Head: freebsd-client


📝 Commits (10+)

  • 651337d compile client under freebsd
  • 4e92ff9 WIP: freebsd ifconfig wrapper package part 1
  • 3f03a28 freebsd ifconfig wrapper
  • 68bfcaa fix parse if name
  • f79509e replace root error with warn log
  • a0eafcc parse error on exit code 1
  • 657dfef add debug to check exist
  • 7e0def2 add debug to all commands
  • fc05dfb use proper log lib
  • dd24569 add debug and fix mask format

📊 Changes

44 files changed (+810 additions, -145 deletions)

View changed files

client/internal/dns/consts_freebsd.go (+6 -0)
client/internal/dns/consts_linux.go (+8 -0)
📝 client/internal/dns/dbus_unix.go (+1 -1)
📝 client/internal/dns/file_parser_unix.go (+1 -1)
📝 client/internal/dns/file_parser_unix_test.go (+1 -1)
📝 client/internal/dns/file_repair_unix.go (+1 -1)
📝 client/internal/dns/file_repair_unix_test.go (+1 -1)
📝 client/internal/dns/file_unix.go (+1 -1)
📝 client/internal/dns/file_unix_test.go (+1 -1)
📝 client/internal/dns/host_unix.go (+5 -11)
📝 client/internal/dns/network_manager_unix.go (+1 -1)
📝 client/internal/dns/resolvconf_unix.go (+1 -1)
📝 client/internal/dns/server_unix.go (+1 -1)
client/internal/dns/systemd_freebsd.go (+20 -0)
📝 client/internal/dns/systemd_linux.go (+22 -0)
📝 client/internal/dns/unclean_shutdown_unix.go (+1 -6)
📝 client/internal/engine.go (+2 -2)
client/internal/routemanager/routeflags_bsd.go (+18 -0)
client/internal/routemanager/routeflags_freebsd.go (+19 -0)
📝 client/internal/routemanager/systemops.go (+4 -0)

...and 24 more files

📄 Description

Describe your changes

Compile netbird client under freebsd and now support netstack and userspace modes.
Refactoring linux specific code to share same code with FreeBSD, move to *_unix.go files.

Not implemented yet:

  • Kernel mode not supported
  • DNS probably does not work yet
  • Routing also probably does not work yet
  • SSH support did not tested yet
  • Lack of test environment for freebsd (dedicated VM for github runners under FreeBSD required)
  • Lack of tests for freebsd specific code
  • info reporting need to review and also implement, for example OS reported as GENERIC instead of FreeBSD (lack of FreeBSD icon in management interface)
  • Lack of proper client setup under FreeBSD
  • Lack of FreeBSD port/package

https://github.com/netbirdio/netbird/issues/1505

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/1620 **Author:** [@skillcoder](https://github.com/skillcoder) **Created:** 2/24/2024 **Status:** ✅ Merged **Merged:** 5/30/2024 **Merged by:** [@pappz](https://github.com/pappz) **Base:** `0.28.0` ← **Head:** `freebsd-client` --- ### 📝 Commits (10+) - [`651337d`](https://github.com/netbirdio/netbird/commit/651337d153a615cce8bd956347bded142a81e546) compile client under freebsd - [`4e92ff9`](https://github.com/netbirdio/netbird/commit/4e92ff9b7174f0000aa9082b64ab94093ebc9707) WIP: freebsd ifconfig wrapper package part 1 - [`3f03a28`](https://github.com/netbirdio/netbird/commit/3f03a2846a9b07b7e3a7411a2fcadde08070b1d5) freebsd ifconfig wrapper - [`68bfcaa`](https://github.com/netbirdio/netbird/commit/68bfcaaa9f4bef7718bcc996d9e18645caf8c347) fix parse if name - [`f79509e`](https://github.com/netbirdio/netbird/commit/f79509e0e406496c57b64ab093cf4e96d75d71f1) replace root error with warn log - [`a0eafcc`](https://github.com/netbirdio/netbird/commit/a0eafccfd45cdff97f95f189dc69743eec591394) parse error on exit code 1 - [`657dfef`](https://github.com/netbirdio/netbird/commit/657dfef1af7453aee74ac4a0ef127ef528bd2426) add debug to check exist - [`7e0def2`](https://github.com/netbirdio/netbird/commit/7e0def2053e196d8347b6c8384d811d9c31e885f) add debug to all commands - [`fc05dfb`](https://github.com/netbirdio/netbird/commit/fc05dfba0ecdbfce66fe30370ef2375b0beb36c8) use proper log lib - [`dd24569`](https://github.com/netbirdio/netbird/commit/dd24569deef9f492b8bcde6a768435087cf4763a) add debug and fix mask format ### 📊 Changes **44 files changed** (+810 additions, -145 deletions) <details> <summary>View changed files</summary> ➕ `client/internal/dns/consts_freebsd.go` (+6 -0) ➕ `client/internal/dns/consts_linux.go` (+8 -0) 📝 `client/internal/dns/dbus_unix.go` (+1 -1) 📝 `client/internal/dns/file_parser_unix.go` (+1 -1) 📝 `client/internal/dns/file_parser_unix_test.go` (+1 -1) 📝 `client/internal/dns/file_repair_unix.go` (+1 -1) 📝 `client/internal/dns/file_repair_unix_test.go` (+1 -1) 📝 `client/internal/dns/file_unix.go` (+1 -1) 📝 `client/internal/dns/file_unix_test.go` (+1 -1) 📝 `client/internal/dns/host_unix.go` (+5 -11) 📝 `client/internal/dns/network_manager_unix.go` (+1 -1) 📝 `client/internal/dns/resolvconf_unix.go` (+1 -1) 📝 `client/internal/dns/server_unix.go` (+1 -1) ➕ `client/internal/dns/systemd_freebsd.go` (+20 -0) 📝 `client/internal/dns/systemd_linux.go` (+22 -0) 📝 `client/internal/dns/unclean_shutdown_unix.go` (+1 -6) 📝 `client/internal/engine.go` (+2 -2) ➕ `client/internal/routemanager/routeflags_bsd.go` (+18 -0) ➕ `client/internal/routemanager/routeflags_freebsd.go` (+19 -0) 📝 `client/internal/routemanager/systemops.go` (+4 -0) _...and 24 more files_ </details> ### 📄 Description ## Describe your changes Compile netbird client under freebsd and now support netstack and userspace modes. Refactoring linux specific code to share same code with FreeBSD, move to *_unix.go files. Not implemented yet: - Kernel mode not supported - DNS probably does not work yet - Routing also probably does not work yet - SSH support did not tested yet - Lack of test environment for freebsd (dedicated VM for github runners under FreeBSD required) - Lack of tests for freebsd specific code - info reporting need to review and also implement, for example OS reported as GENERIC instead of FreeBSD (lack of FreeBSD icon in management interface) - Lack of proper client setup under FreeBSD - Lack of FreeBSD port/package ## Issue ticket number and link https://github.com/netbirdio/netbird/issues/1505 ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [x] Is a feature enhancement - [x] 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 03:08:08 -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#15658