2 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
126e9c13de d/libn/i/nftables: fix ST1016 (staticcheck)
Looks like the linter didn't detect this in de71462b97

    daemon/libnetwork/internal/nftables/fluentapi_linux.go:8:20: ST1016: methods on the same type should have the same receiver name (seen 1x "b", 2x "cd") (staticcheck)
    func (b BaseChain) Builder() chainBuilder {
                       ^
    daemon/libnetwork/internal/nftables/fluentapi_linux.go:14:16: ST1016: methods on the same type should have the same receiver name (seen 1x "c", 2x "cd") (staticcheck)
    func (c Chain) Builder() chainBuilder {
                   ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-07-02 23:09:09 +02:00
Cory Snider
de71462b97 d/libn/i/nftables: add fluent chain builder API
With most of the dynamism of nftables rulesets being powered by named
maps and sets, the rules of a chain are often initialized when the chain
is added, and never touched again. Add a fluent API for adding the
creation of a chain and all its rules to a modifier without having to
repeat the chain name for each rule.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2026-06-29 18:42:18 -04:00