{"record":{"id":"e38f8d0556a4de80","repo":"netbirdio/netbird","slug":"parse-ifconfig-output-w","errorCode":null,"errorMessage":"parse ifconfig output: %w","messagePattern":"parse ifconfig output: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/iface/freebsd/link.go","lineNumber":41,"sourceCode":"\t}\n}\n\n// LinkByName retrieves a network interface by its name.\nfunc LinkByName(name string) (*Link, error) {\n\tout, err := exec.Command(\"ifconfig\", name).CombinedOutput()\n\tif err != nil {\n\t\tif pErr := parseError(out); pErr != nil {\n\t\t\treturn nil, pErr\n\t\t}\n\n\t\tlog.Debugf(\"ifconfig out: %s\", out)\n\n\t\treturn nil, fmt.Errorf(\"command run: %w\", err)\n\t}\n\n\ti, err := parseIfconfigOutput(out)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"parse ifconfig output: %w\", err)\n\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 {","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/netbirdio/netbird/blob/93e97f4bf1ad715072dcb3fb6cdb1763431b5a9c/client/iface/freebsd/link.go#L23-L59","documentation":"Error \"parse ifconfig output: %w\" thrown in netbirdio/netbird.","triggerScenarios":"Thrown at client/iface/freebsd/link.go:41 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"}