Skip to content

Commit 1d62f8a

Browse files
sagigrimbergdwsuse
authored andcommitted
fabrics: don't treat host_traddr 'none' as a valid hostname
We treat 'none' as an escape value for optional arguments, do the same for host_traddr. This makes prints like the below go away when passing --host-traddr=none: sh[3244]: failed to resolve host none info Signed-off-by: Sagi Grimberg <[email protected]> Signed-off-by: Daniel Wagner <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent deb48a7 commit 1d62f8a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/nvme/tree.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -960,6 +960,8 @@ static bool traddr_is_hostname(const char *transport, const char *traddr)
960960

961961
if (!traddr || !transport)
962962
return false;
963+
if (!strcmp(traddr, "none"))
964+
return false;
963965
if (strcmp(transport, "tcp") &&
964966
strcmp(transport, "rdma"))
965967
return false;

0 commit comments

Comments
 (0)