{"record":{"id":"b756295df4ef152f","repo":"netbirdio/netbird","slug":"refresh-v4-rules-w","errorCode":null,"errorMessage":"refresh v4 rules: %w","messagePattern":"refresh v4 rules: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/firewall/nftables/manager_linux.go","lineNumber":357,"sourceCode":"\t}\n\treturn r.DeleteRouteRule(rule)\n}\n\n// routerForRuleID picks the router holding the rule with the given id, using\n// the supplied lookup. If the cached maps disagree (or both miss), it refreshes\n// from the kernel once and re-checks before falling back to the v4 router.\nfunc (m *Manager) routerForRuleID(id string, has func(*router, string) bool) (*router, error) {\n\tif has(m.router, id) {\n\t\treturn m.router, nil\n\t}\n\tif m.hasIPv6() && has(m.router6, id) {\n\t\treturn m.router6, nil\n\t}\n\tif !m.hasIPv6() {\n\t\treturn m.router, nil\n\t}\n\tif err := m.router.refreshRulesMap(); err != nil {\n\t\treturn nil, fmt.Errorf(\"refresh v4 rules: %w\", err)\n\t}\n\tif err := m.router6.refreshRulesMap(); err != nil {\n\t\treturn nil, fmt.Errorf(\"refresh v6 rules: %w\", err)\n\t}\n\tif has(m.router6, id) && !has(m.router, id) {\n\t\treturn m.router6, nil\n\t}\n\treturn m.router, nil\n}\n\nfunc (m *Manager) IsServerRouteSupported() bool {\n\treturn true\n}\n\nfunc (m *Manager) IsStateful() bool {\n\treturn true\n}\n","sourceCodeStart":339,"sourceCodeEnd":375,"githubUrl":"https://github.com/netbirdio/netbird/blob/93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c/client/firewall/nftables/manager_linux.go#L339-L375","documentation":"routerForRuleID fell through to the kernel-refresh path and refreshing the v4 router's cached rules from nftables failed. Happens when the cached rule maps disagree with the lookup; the refresh is the one-shot resync before falling back to v4.","triggerScenarios":"Thrown at client/firewall/nftables/manager_linux.go:357 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check nftables readability with 'nft list ruleset'","Restart the daemon to rebuild rule caches from scratch","If it recurs, capture which rule id triggered the refresh path"],"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"}