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

RFE: firewall combine setup_network and setup_port_forward into one function #957

Open
Luap99 opened this issue Apr 3, 2024 · 0 comments

Comments

@Luap99
Copy link
Member

Luap99 commented Apr 3, 2024

Splitting the logic into two separate functions just seems to make the code more complicated, looking at iptables where we mostly use different table that may have made more sense but if we consider the nftables driver this seems like the wrong choice.

For nftables we only need to dump the rules once yet because the code is split into two functions calls we end up dumping the ruleset twice which makes things slower than it needs to be.

let existing_rules = helper::get_current_ruleset(None, None)?;

let existing_rules = helper::get_current_ruleset(None, None)?;

The same goes for the teardown functions.

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

1 participant