{"record":{"id":"5d665633ac20a41c","repo":"netbirdio/netbird","slug":"add-firewall-rule-w","errorCode":null,"errorMessage":"add firewall rule: %w","messagePattern":"add firewall rule: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/internal/acl/manager.go","lineNumber":363,"sourceCode":"\tcase *mgmProto.PortInfo_Range_:\n\t\tr := portInfo.GetRange()\n\t\treturn r == nil || r.Start == 0 || r.End == 0\n\tdefault:\n\t\treturn true\n\t}\n}\n\nfunc (d *DefaultManager) addInRules(\n\tid []byte,\n\tip netip.Addr,\n\tprotocol firewall.Protocol,\n\tport *firewall.Port,\n\taction firewall.Action,\n\tipsetName string,\n) ([]firewall.Rule, error) {\n\trule, err := d.firewall.AddPeerFiltering(id, ip.AsSlice(), protocol, nil, port, action, ipsetName)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"add firewall rule: %w\", err)\n\t}\n\n\treturn rule, nil\n}\n\nfunc (d *DefaultManager) addOutRules(\n\tid []byte,\n\tip netip.Addr,\n\tprotocol firewall.Protocol,\n\tport *firewall.Port,\n\taction firewall.Action,\n\tipsetName string,\n) ([]firewall.Rule, error) {\n\tif shouldSkipInvertedRule(protocol, port) {\n\t\treturn nil, nil\n\t}\n\n\trule, err := d.firewall.AddPeerFiltering(id, ip.AsSlice(), protocol, port, nil, action, ipsetName)","sourceCodeStart":345,"sourceCodeEnd":381,"githubUrl":"https://github.com/netbirdio/netbird/blob/93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c/client/internal/acl/manager.go#L345-L381","documentation":"Error \"add firewall rule: %w\" thrown in netbirdio/netbird.","triggerScenarios":"Thrown at client/internal/acl/manager.go:363 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"}