diff --git a/src/nvme/fabrics.c b/src/nvme/fabrics.c index bfc8cd3c..1222da92 100644 --- a/src/nvme/fabrics.c +++ b/src/nvme/fabrics.c @@ -779,9 +779,12 @@ static int __nvmf_add_ctrl(nvme_root_t r, const char *argstr) case EOPNOTSUPP: ret = -ENVME_CONNECT_OPNOTSUPP; break; - case ECONNREFUSED : + case ECONNREFUSED: ret = -ENVME_CONNECT_CONNREFUSED; break; + case EADDRNOTAVAIL: + ret = -ENVME_CONNECT_ADDRNOTAVAIL; + break; default: ret = -ENVME_CONNECT_WRITE; break; diff --git a/src/nvme/util.c b/src/nvme/util.c index c8e759c0..8592685b 100644 --- a/src/nvme/util.c +++ b/src/nvme/util.c @@ -567,8 +567,9 @@ static const char * const libnvme_status[] = { [ENVME_CONNECT_INVAL] = "invalid arguments/configuration", [ENVME_CONNECT_ADDRINUSE] = "hostnqn already in use", [ENVME_CONNECT_NODEV] = "invalid interface", - [ENVME_CONNECT_OPNOTSUPP] ="not supported", + [ENVME_CONNECT_OPNOTSUPP] = "not supported", [ENVME_CONNECT_CONNREFUSED] = "connection refused", + [ENVME_CONNECT_ADDRNOTAVAIL] = "cannot assign requested address", }; const char *nvme_errno_to_string(int status) diff --git a/src/nvme/util.h b/src/nvme/util.h index 3e30ed2b..0c1e646c 100644 --- a/src/nvme/util.h +++ b/src/nvme/util.h @@ -36,7 +36,8 @@ * @ENVME_CONNECT_ADDRINUSE: hostnqn already in use * @ENVME_CONNECT_NODEV: invalid interface * @ENVME_CONNECT_OPNOTSUPP: not supported - * @ENVME_CONNECT_CONNREFUSED: connection refused + * @ENVME_CONNECT_CONNREFUSED: connection refused + * @ENVME_CONNECT_ADDRNOTAVAIL: cannot assign requested address */ enum nvme_connect_err { ENVME_CONNECT_RESOLVE = 1000, @@ -57,6 +58,7 @@ enum nvme_connect_err { ENVME_CONNECT_NODEV, ENVME_CONNECT_OPNOTSUPP, ENVME_CONNECT_CONNREFUSED, + ENVME_CONNECT_ADDRNOTAVAIL, }; /**