{"record":{"id":"c555a78bbcdd6279","repo":"netbirdio/netbird","slug":"remove-legacy-forwarding-rule-v-c555a7","errorCode":null,"errorMessage":"remove legacy forwarding rule: %v","messagePattern":"remove legacy forwarding rule: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/firewall/nftables/router_linux.go","lineNumber":1053,"sourceCode":"\n// SetLegacyManagement sets the route manager to use legacy management mode\nfunc (r *router) SetLegacyManagement(isLegacy bool) {\n\tr.legacyManagement = isLegacy\n}\n\n// RemoveAllLegacyRouteRules removes all legacy routing rules for mgmt servers pre route acls\nfunc (r *router) RemoveAllLegacyRouteRules() error {\n\tif err := r.refreshRulesMap(); err != nil {\n\t\treturn fmt.Errorf(refreshRulesMapError, err)\n\t}\n\n\tvar merr *multierror.Error\n\tfor k, rule := range r.rules {\n\t\tif !strings.HasPrefix(k, firewall.ForwardingFormatPrefix) {\n\t\t\tcontinue\n\t\t}\n\t\tif err := r.conn.DelRule(rule); err != nil {\n\t\t\tmerr = multierror.Append(merr, fmt.Errorf(\"remove legacy forwarding rule: %v\", err))\n\t\t} else {\n\t\t\tdelete(r.rules, k)\n\t\t}\n\n\t}\n\treturn nberrors.FormatErrorOrNil(merr)\n}\n\n// acceptForwardRules adds iif/oif rules in the filter table/forward chain to make sure\n// that our traffic is not dropped by existing rules there.\n// The existing FORWARD rules/policies decide outbound traffic towards our interface.\n// In case the FORWARD policy is set to \"drop\", we add an established/related rule to allow return traffic for the inbound rule.\n// This method also adds INPUT chain rules to allow traffic to the local interface.\nfunc (r *router) acceptForwardRules() error {\n\tvar merr *multierror.Error\n\n\tif err := r.acceptFilterTableRules(); err != nil {\n\t\tmerr = multierror.Append(merr, err)","sourceCodeStart":1035,"sourceCodeEnd":1071,"githubUrl":"https://github.com/netbirdio/netbird/blob/93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c/client/firewall/nftables/router_linux.go#L1035-L1071","documentation":"Error \"remove legacy forwarding rule: %v\" thrown in netbirdio/netbird.","triggerScenarios":"Thrown at client/firewall/nftables/router_linux.go:1053 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c","analyzedAt":"2026-08-16T03:09:19.136Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}