{"record":{"id":"e4e1444099051bb3","repo":"netbirdio/netbird","slug":"del-w","errorCode":null,"errorMessage":"del: %w","messagePattern":"del: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/iface/freebsd/link.go","lineNumber":60,"sourceCode":"\t}\n\n\tif i.Name != name {\n\t\treturn nil, ErrNameDoesNotMatch\n\t}\n\n\treturn &Link{name: i.Name}, nil\n}\n\n// Recreate - create new interface, remove current before create if it exists\nfunc (l *Link) Recreate() error {\n\tok, err := l.isExist()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"is exist: %w\", err)\n\t}\n\n\tif ok {\n\t\tif err := l.del(l.name); err != nil {\n\t\t\treturn fmt.Errorf(\"del: %w\", err)\n\t\t}\n\t}\n\n\treturn l.Add()\n}\n\n// Add creates a new network interface.\nfunc (l *Link) Add() error {\n\tparsedName, err := l.create(wgIFGroup)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"create link: %w\", err)\n\t}\n\n\tif parsedName == l.name {\n\t\treturn nil\n\t}\n\n\tparsedName, err = l.rename(parsedName, l.name)","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/netbirdio/netbird/blob/93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c/client/iface/freebsd/link.go#L42-L78","documentation":"Deleting the existing interface (l.del) failed during Recreate after existence was confirmed. Recreate cannot proceed to Add because the old link is still present under the target name, so the error propagates with the netlink/ifconfig cause.","triggerScenarios":"Thrown at client/iface/freebsd/link.go:60 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Delete the interface manually with ifconfig <name> destroy","Check permissions for destroying interfaces","Retry Recreate"],"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"}