{"record":{"id":"ca194d6cff11d14d","repo":"netbirdio/netbird","slug":"apply-destination-w","errorCode":null,"errorMessage":"apply destination: %w","messagePattern":"apply destination: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/firewall/nftables/router_linux.go","lineNumber":420,"sourceCode":"\tcase len(sources) == 1 && sources[0].Bits() == 0:\n\t\t// If it's 0.0.0.0/0, we don't need to add any source matching\n\tcase len(sources) == 1:\n\t\t// If there's only one source, we can use it directly\n\t\tsource.Prefix = sources[0]\n\tdefault:\n\t\t// If there are multiple sources, use a set\n\t\tsource.Set = firewall.NewPrefixSet(sources)\n\t}\n\n\tsourceExp, err := r.applyNetwork(source, sources, true)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"apply source: %w\", err)\n\t}\n\texprs = append(exprs, sourceExp...)\n\n\tdestExp, err := r.applyNetwork(destination, nil, false)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"apply destination: %w\", err)\n\t}\n\texprs = append(exprs, destExp...)\n\n\t// Handle protocol\n\tif proto != firewall.ProtocolALL {\n\t\tprotoNum, err := r.af.protoNum(proto)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"convert protocol to number: %w\", err)\n\t\t}\n\t\texprs = append(exprs, &expr.Meta{Key: expr.MetaKeyL4PROTO, Register: 1})\n\t\texprs = append(exprs, &expr.Cmp{\n\t\t\tOp:       expr.CmpOpEq,\n\t\t\tRegister: 1,\n\t\t\tData:     []byte{protoNum},\n\t\t})\n\n\t\texprs = append(exprs, applyPort(sPort, true)...)\n\t\texprs = append(exprs, applyPort(dPort, false)...)","sourceCodeStart":402,"sourceCodeEnd":438,"githubUrl":"https://github.com/netbirdio/netbird/blob/93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c/client/firewall/nftables/router_linux.go#L402-L438","documentation":"Error \"apply destination: %w\" thrown in netbirdio/netbird.","triggerScenarios":"Thrown at client/firewall/nftables/router_linux.go:420 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"}