falter-bird-utils: add UCI-to-Bird2 configuration translator#502
Open
adityachooramani wants to merge 4 commits intofreifunk-berlin:mainfrom
Open
falter-bird-utils: add UCI-to-Bird2 configuration translator#502adityachooramani wants to merge 4 commits intofreifunk-berlin:mainfrom
adityachooramani wants to merge 4 commits intofreifunk-berlin:mainfrom
Conversation
Member
|
@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 |
Member
|
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:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.