Skip to content

Blocking Firewall Apply (filter reload functionality) #278

@VIKMSTR

Description

@VIKMSTR

Is your feature request related to existing pfSense functionality that is missing from the API? Please describe.
Not really, just a feature improvement

Is your feature request related to a problem? Please describe.
When creating big amount (tens, hundreds) of firewall rules in a cycle, when apply is set to true (and the rule is immediately applied and filter reloaded), the reloading time gets bigger and bigger (as more and more rules are being added) and sometimes it happens, that the change is not applied.

That's because, the async method filter_configure is called - the request does not wait (block) till the reload finishes in background.

Describe the solution you'd like
I would like have an option to patiently wait for the reloading to finish, so the request gets blocked for some time. There already is a function filter_configure_sync that could be use.

Can we add an option to FirewallApply and FirewallRule request for that?

Describe alternatives you've considered
An alternative is to batch process all of the rules and then call the FirewallApply. However there might be another calls on my client side that does not know if the FirewallApply was finished or not (because it also uses async filter_configure function).

Additional context
I'm ready to help with a PR regarding this issue. Just do not know which approach to choose - (parametrization of existing endpoints?)

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions