Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: add prio parameter for filtering rules #74

Open
adschm opened this issue Jan 31, 2021 · 3 comments
Open

feature request: add prio parameter for filtering rules #74

adschm opened this issue Jan 31, 2021 · 3 comments

Comments

@adschm
Copy link

adschm commented Jan 31, 2021

So far, filtering rules are evaluated based on their order in the configuration (or uci config for OpenWrt).

This is rather inconvenient when using scripts to alter these configurations (particularly for uci config in OpenWrt), as it may be hard to control the position of a specific entry without rewriting everything again in the new order. A common case is when one wants to add redistribute filters for local routes before the "redistribute local deny" filter that needs to be last.

Since the config is only evaluated "at start" and not updated dynamically, it should be simple enough to provide an ordering of the filtering rules by a prio parameter when reading them (of course, with a default prio where the order will be used again as default).

This would be a great help.

@jech
Copy link
Owner

jech commented Apr 1, 2022

Agreed, that's a good idea. And it would not be too difficult to use the priority even if rules are added at runtime.

@DanielG
Copy link
Contributor

DanielG commented Jan 26, 2023

@adschm Have you considered using the -c file option to include multiple config files before/after the main one? I do that in my setup to make the config a little more composable.

One thing that we'd have to patch to make that really workable is the ability to ignore missing config files though.

@jech
Copy link
Owner

jech commented Apr 26, 2023

One thing that we'd have to patch to make that really workable is the ability to ignore missing config files though.

fn="/dev/null"
[-f "$filename" ] && fn="$filename"
babeld -c "$fn"

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

No branches or pull requests

3 participants