netbirdio/netbird · error

list tables

Error message

list tables: %w

What it means

Listing all nftables tables failed while cleanupNetbirdTables was trying to find and delete the NetBird-owned tables during Close. Without the listing the cleanup cannot identify which tables to remove, so NetBird tables may remain in the kernel after shutdown; the error is accumulated into the Close multierror.

Solutions

  1. Verify the nftables netlink subsystem is available
  2. Retry the Close/cleanup operation
  3. Check for netlink socket exhaustion in long-running daemons
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at client/firewall/nftables/manager_linux.go:515 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/587dc9041935c726. Report an issue: GitHub.

Appendix: source

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

	if err := m.cleanupNetbirdTables(); err != nil {
		merr = multierror.Append(merr, fmt.Errorf("cleanup netbird tables: %v", err))
	}

	if err := m.rConn.Flush(); err != nil {
		merr = multierror.Append(merr, fmt.Errorf(flushError, err))
	}

	if err := stateManager.DeleteState(&ShutdownState{}); err != nil {
		merr = multierror.Append(merr, fmt.Errorf("delete state: %v", err))
	}

	return nberrors.FormatErrorOrNil(merr)
}

func (m *Manager) cleanupNetbirdTables() error {
	tables, err := m.rConn.ListTables()
	if err != nil {
		return fmt.Errorf("list tables: %w", err)
	}

	tableName := getTableName()
	for _, t := range tables {
		if t.Name == tableName {
			m.rConn.DelTable(t)
		}
	}
	return nil
}

// SetLogLevel sets the log level for the firewall manager
func (m *Manager) SetLogLevel(log.Level) {
	// not supported
}

func (m *Manager) EnableRouting() error {
	// v6 only when the overlay actually has v6.

View on GitHub (pinned to 93e97f4bf1)