netbirdio/netbird · error

v4

Error message

v4: %w

What it means

During reconcileExternalChains (triggered by the netlink monitor when tables/chains reappear, e.g. after a firewalld reload), re-applying the passthrough accept rules to external chains failed for the IPv4 router. Errors for both families are accumulated.

Solutions

  1. Check 'nft list ruleset' for conflicting external chain state
  2. If firewalld is reloading repeatedly, stabilize it
  3. The monitor retries on the next relevant event; verify rules converge afterwards
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at client/firewall/nftables/manager_linux.go:167 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of netbirdio/netbird@93e97f4bf1 (2026-08-16). Data as JSON: /api/errors/59ad4c50476a95da. Report an issue: GitHub.

Appendix: source

Thrown at client/firewall/nftables/manager_linux.go:167

	// Start after initFirewall has installed the baseline external-chain
	// accept rules. start() is idempotent across Init/Close/Init cycles.
	m.extMonitor.start()

	return nil
}

// reconcileExternalChains re-applies passthrough accept rules to external
// filter chains for both IPv4 and IPv6 routers. Called by the monitor when
// tables or chains appear (e.g. after firewalld reloads).
func (m *Manager) reconcileExternalChains() error {
	m.mutex.Lock()
	defer m.mutex.Unlock()

	var merr *multierror.Error
	if m.router != nil {
		if err := m.router.acceptExternalChainsRules(); err != nil {
			merr = multierror.Append(merr, fmt.Errorf("v4: %w", err))
		}
	}
	if m.hasIPv6() {
		if err := m.router6.acceptExternalChainsRules(); err != nil {
			merr = multierror.Append(merr, fmt.Errorf("v6: %w", err))
		}
	}
	return nberrors.FormatErrorOrNil(merr)
}

func (m *Manager) initFirewall() (err error) {
	workTable, err := m.createWorkTable()
	if err != nil {
		return fmt.Errorf("create work table: %w", err)
	}

	defer func() {
		if err != nil {

View on GitHub (pinned to 93e97f4bf1)