{"record":{"id":"5277f8f447cbe5f0","repo":"netbirdio/netbird","slug":"list-chains-v","errorCode":null,"errorMessage":"list chains: %v","messagePattern":"list chains: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/firewall/nftables/router_linux.go","lineNumber":1331,"sourceCode":"\t}\n\n\tipt, err := iptables.NewWithProtocol(r.iptablesProto())\n\tif err != nil {\n\t\tlog.Debugf(\"iptables not available, using nftables to remove filter rules: %v\", err)\n\t\treturn r.removeAcceptRulesFromTable(r.filterTable)\n\t}\n\n\tif err := r.removeAcceptFilterRulesIptables(ipt); err != nil {\n\t\tlog.Debugf(\"iptables removal failed (table may be incompatible), falling back to nftables: %v\", err)\n\t\treturn r.removeAcceptRulesFromTable(r.filterTable)\n\t}\n\treturn nil\n}\n\nfunc (r *router) removeAcceptRulesFromTable(table *nftables.Table) error {\n\tchains, err := r.conn.ListChainsOfTableFamily(table.Family)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"list chains: %v\", err)\n\t}\n\n\tfor _, chain := range chains {\n\t\tif chain.Table.Name != table.Name {\n\t\t\tcontinue\n\t\t}\n\n\t\tif chain.Name != chainNameForward && chain.Name != chainNameInput {\n\t\t\tcontinue\n\t\t}\n\n\t\tif err := r.removeAcceptRulesFromChain(table, chain); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn r.conn.Flush()\n}","sourceCodeStart":1313,"sourceCodeEnd":1349,"githubUrl":"https://github.com/netbirdio/netbird/blob/93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c/client/firewall/nftables/router_linux.go#L1313-L1349","documentation":"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.","triggerScenarios":"Thrown at client/firewall/nftables/router_linux.go:1331 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the removal path","Verify nftables subsystem availability","Fall back to manual nft cleanup"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c","analyzedAt":"2026-08-16T03:09:19.136Z","contentChangedAt":"2026-08-16T03:09:19.136Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}