Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
// write status
var status *IPCError
if err != nil && !errors.As(err, &status) {
- // I/O error, maybe something unexpected
- status = ipcErrorf(1, "other UAPI error: %w", err)
+ // shouldn't happen
+ status = ipcErrorf(ipc.IpcErrorUnknown, "other UAPI error: %w", err)
}
if status != nil {
device.log.Error.Println(status)
IpcErrorProtocol = -int64(unix.EPROTO)
IpcErrorInvalid = -int64(unix.EINVAL)
IpcErrorPortInUse = -int64(unix.EADDRINUSE)
+ IpcErrorUnknown = -55 // ENOANO
)
// socketDirectory is variable because it is modified by a linker