netbirdio/netbird · error
list chains
Error message
list chains: %v
What it means
Listing chains of the table family failed at the start of removeAcceptRulesFromTable, the nftables fallback for removing accept rules. Without the chain list the tagged accept rules cannot be found for deletion.
Solutions
- Retry the removal path
- Verify nftables subsystem availability
- Fall back to manual nft cleanup
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at client/firewall/nftables/router_linux.go:1331 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/5277f8f447cbe5f0.
Report an issue: GitHub.
Appendix: source
Thrown at client/firewall/nftables/router_linux.go:1331
}
ipt, err := iptables.NewWithProtocol(r.iptablesProto())
if err != nil {
log.Debugf("iptables not available, using nftables to remove filter rules: %v", err)
return r.removeAcceptRulesFromTable(r.filterTable)
}
if err := r.removeAcceptFilterRulesIptables(ipt); err != nil {
log.Debugf("iptables removal failed (table may be incompatible), falling back to nftables: %v", err)
return r.removeAcceptRulesFromTable(r.filterTable)
}
return nil
}
func (r *router) removeAcceptRulesFromTable(table *nftables.Table) error {
chains, err := r.conn.ListChainsOfTableFamily(table.Family)
if err != nil {
return fmt.Errorf("list chains: %v", err)
}
for _, chain := range chains {
if chain.Table.Name != table.Name {
continue
}
if chain.Name != chainNameForward && chain.Name != chainNameInput {
continue
}
if err := r.removeAcceptRulesFromChain(table, chain); err != nil {
return err
}
}
return r.conn.Flush()
}View on GitHub (pinned to 93e97f4bf1)