Skip to content

[client] Fix FreeBSD not reporting network addresses#5827

Merged
lixmal merged 1 commit intomainfrom
fix-freebsd-network-addresses
Apr 8, 2026
Merged

[client] Fix FreeBSD not reporting network addresses#5827
lixmal merged 1 commit intomainfrom
fix-freebsd-network-addresses

Conversation

@lixmal
Copy link
Copy Markdown
Collaborator

@lixmal lixmal commented Apr 8, 2026

Describe your changes

FreeBSD peers report an empty network_addresses in their system info because GetInfo on FreeBSD never called networkAddresses(). All other platforms (Linux, Darwin, Windows) populate this field.

  • Call networkAddresses() in info_freebsd.go and set the NetworkAddresses field, matching other platforms

Issue ticket number and link

Stack

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)

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

Documentation

Select exactly one:

  • I added/updated documentation for this change
  • Documentation is not needed for this change (explain why)

The function already existed, it just wasn't called on FreeBSD.

Docs PR URL (required if "docs added" is checked)

Paste the PR link from https://github.com/netbirdio/docs here:

https://github.com/netbirdio/docs/pull/__

Summary by CodeRabbit

  • New Features

    • FreeBSD systems now report network addresses in system information.
  • Bug Fixes

    • System information retrieval no longer fails if network address discovery encounters issues; a warning is logged instead.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 8, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fabccc2d-6325-40a7-928b-388997732bb9

📥 Commits

Reviewing files that changed from the base of the PR and between 413d95b and 30ea5b8.

📒 Files selected for processing (1)
  • client/system/info_freebsd.go

📝 Walkthrough

Walkthrough

The GetInfo function in the FreeBSD system info module now discovers network addresses by calling networkAddresses() and populates the returned *Info struct with a new NetworkAddresses field. If address discovery fails, a warning is logged instead of interrupting execution.

Changes

Cohort / File(s) Summary
Network Address Discovery
client/system/info_freebsd.go
Added call to networkAddresses() to discover and populate NetworkAddresses field in returned *Info struct; graceful error handling logs warning on discovery failure.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A rabbit hops through network lanes,
Discovering addresses on FreeBSD plains,
With warnings soft when paths don't show,
The system info can always flow!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The pull request title accurately describes the main change: adding network address reporting functionality to FreeBSD's GetInfo method.
Description check ✅ Passed The pull request description follows the template structure with all key sections completed: description of changes, issue ticket number field (appropriately left empty), stack section, checklist with bug fix selected, and documentation decision documented.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-freebsd-network-addresses

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 8, 2026

@lixmal lixmal merged commit c7ba931 into main Apr 8, 2026
41 of 42 checks passed
@lixmal lixmal deleted the fix-freebsd-network-addresses branch April 8, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants