talos/pkg/machinery/nethelpers/conntrack_state.go
Andrey Smirnov 9a85217412
feat: improve nftables backend
Many changes to the nftables backend which will be used in the follow-up
PR with #4421.

1. Add support for chain policy: drop/accept.
2. Properly handle match on all IPs in the set (`0.0.0.0/0` like).
3. Implement conntrack state matching.
4. Implement multiple ifname matching in a single rule.
5. Implement anonymous counters.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-11-29 21:22:47 +04:00

21 lines
661 B
Go

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
package nethelpers
//go:generate enumer -type=ConntrackState -linecomment -text
// ConntrackState is a conntrack state.
type ConntrackState uint32
// ConntrackState constants.
//
//structprotogen:gen_enum
const (
ConntrackStateNew ConntrackState = 0x08 // new
ConntrackStateRelated ConntrackState = 0x04 // related
ConntrackStateEstablished ConntrackState = 0x02 // established
ConntrackStateInvalid ConntrackState = 0x01 // invalid
)