From 6b5f7648565efb73fea7c8fa6989c31ffa461db4 Mon Sep 17 00:00:00 2001 From: "dongx.yi" Date: Tue, 17 Dec 2019 08:01:01 -0500 Subject: [PATCH] nvmf/tcp: fix wrong judgement of ipv6. Here should check spdk_sock_is_ipv6. Signed-off-by: dongx.yi Change-Id: I828c322b79f6d1ac3f9e004d6062358c1d567d4e Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478142 Tested-by: SPDK CI Jenkins Community-CI: Broadcom SPDK FC-NVMe CI Reviewed-by: Shuhei Matsumoto Reviewed-by: Alexey Marchuk Reviewed-by: Ben Walker --- lib/nvmf/tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nvmf/tcp.c b/lib/nvmf/tcp.c index 5ab54411ca..e1639a57f5 100644 --- a/lib/nvmf/tcp.c +++ b/lib/nvmf/tcp.c @@ -2679,7 +2679,7 @@ spdk_nvmf_tcp_qpair_get_trid(struct spdk_nvmf_qpair *qpair, if (spdk_sock_is_ipv4(tqpair->sock)) { trid->adrfam = SPDK_NVMF_ADRFAM_IPV4; - } else if (spdk_sock_is_ipv4(tqpair->sock)) { + } else if (spdk_sock_is_ipv6(tqpair->sock)) { trid->adrfam = SPDK_NVMF_ADRFAM_IPV6; } else { return -1;