Skip to content

Commit

Permalink
nbft: fix tcp/dhcp address fallback retry
Browse files Browse the repository at this point in the history
libnvme introduced a specific error code (NVME_CONNECT_ADDRNOTAVAIL)
when the address is not available. Previously, the generic error
code (NVME_CONNENCT_WRITE) was return in this case.

Signed-off-by: Stuart Hayes <[email protected]>
[dwagner: added commit message]
Signed-off-by: Daniel Wagner <[email protected]>
  • Loading branch information
stuarthayes authored and igaw committed Jan 22, 2024
1 parent b5a741b commit 64de246
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nbft.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ int discover_from_nbft(nvme_root_t r, char *hostnqn_arg, char *hostid_arg,
* obtains a different local IP address than the
* firmware had. Retry without host_traddr.
*/
if (ret == -1 && errno == ENVME_CONNECT_WRITE &&
if (ret == -1 && errno == ENVME_CONNECT_ADDRNOTAVAIL &&
!strcmp((*ss)->transport, "tcp") &&
strlen(hfi->tcp_info.dhcp_server_ipaddr) > 0) {
nvme_free_ctrl(c);
Expand Down

0 comments on commit 64de246

Please sign in to comment.