Skip to content

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

@Luap99

Description

@Luap99

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions