connmark

package
v0.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package connmark mirrors sysnet packet marks through conntrack marks so inbound replies are marked before distribution rpfilter chains run.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Marks []Mark
}

Config is the complete connmark ruleset owned by Manager.

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager reconciles the package-owned nftables connmark table.

func NewManager

func NewManager() *Manager

NewManager creates a Manager backed by the current network namespace.

func (*Manager) Apply

func (m *Manager) Apply(config Config) error

Apply replaces the package-owned connmark table with rules for config.

func (*Manager) Close

func (m *Manager) Close() error

Close releases Manager state. nftables.Conn is transient by default, so there is no persistent kernel socket to close.

func (*Manager) Rollback

func (m *Manager) Rollback() error

Rollback deletes the package-owned connmark table.

type Mark

type Mark struct {
	Value uint32
	Mask  uint32
}

Mark describes a packet-mark selector whose value should be mirrored through conntrack.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL