Skip to content

Comments

falter-bird-utils: add UCI-to-Bird2 configuration translator#502

Open
adityachooramani wants to merge 4 commits intofreifunk-berlin:mainfrom
adityachooramani:feature/bird2-uci-translator
Open

falter-bird-utils: add UCI-to-Bird2 configuration translator#502
adityachooramani wants to merge 4 commits intofreifunk-berlin:mainfrom
adityachooramani:feature/bird2-uci-translator

Conversation

@adityachooramani
Copy link

Pull Request Submission
Compile tested: No (Architecture-independent shell scripts and UCI configuration) Run tested: Yes.

Arch: x86_64

Model: QEMU VM

Falter Version: Snapshot (Dec 2025)

Tests done: 1. Verified procd triggers: uci commit successfully triggers config regeneration and bird reload. 2. Verified Dynamic ID: Logic successfully pulled the br-lan IP (192.168.42.1) for the router id. 3. Verified Syntax: bird -p -c /var/etc/bird.conf returns no errors. 4. Verified Filters: UCI import_filter and export_filter options correctly map to Bird2 protocol channels.

Description of the changes: This PR introduces the falter-bird-utils package, a dedicated UCI-to-Bird2 translator. It is designed to modernize how Bird2 is handled on Falter nodes by moving away from static files toward a dynamic, UCI-driven approach.

Key Features:

Automated Logic: Uses an init script with procd integration to handle lifecycle and configuration generation.

Hardware Friendly: Writes the generated bird.conf to /var/etc (RAM) to prevent unnecessary flash wear.

Intelligent Discovery: Includes a BusyBox-compliant pipeline to automatically detect the node's primary IPv4 for the BGP router id.

Bird 2.x Syntax: Specifically handles the local as and ipv6 { channel } syntax requirements of modern Bird versions.

@akira25
Copy link
Member

akira25 commented Feb 15, 2026

@adityachooramani please do never merge the main branch into a feature branch. Please rebase instead: https://git-scm.com/book/en/v2/Git-Branching-Rebasing

@akira25
Copy link
Member

akira25 commented Feb 15, 2026

I'm not an expert for bird2, thus you should get a detailed review from another person. I have two remarks though from skimming your code:

  1. You set r_id=1.1.1.1 as a default, when you can not detect another gloabl IP-Address. I know, that most of the internet uses cloudflare and doesn't care, but at freifunk, we see monopolies a bit critical. It would be better, to make that configurable somehow. A good alternative (at least for people located in europe) is Quad9, whichs uncensored Service is a 9.9.9.10
  2. What does your software do, when there is no IPv4 address? Many freifunk communities do IPv6-only already. Your software should be IP-Version agnostic, if possible.

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.

2 participants