[PATCH rfc 2/6] nvme-tcp: use nvmf_resolve_address helper
Sagi Grimberg
sagi at grimberg.me
Mon Jul 24 02:20:18 PDT 2023
Signed-off-by: Sagi Grimberg <sagi at grimberg.me>
---
drivers/nvme/host/tcp.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
index 3e7dd6f91832..a47b597ace3e 100644
--- a/drivers/nvme/host/tcp.c
+++ b/drivers/nvme/host/tcp.c
@@ -2537,8 +2537,7 @@ static struct nvme_ctrl *nvme_tcp_create_ctrl(struct device *dev,
opts->mask |= NVMF_OPT_TRSVCID;
}
- ret = inet_pton_with_scope(&init_net, AF_UNSPEC,
- opts->traddr, opts->trsvcid, &ctrl->addr);
+ ret = nvmf_resolve_ip_address(opts, &ctrl->addr);
if (ret) {
pr_err("malformed address passed: %s:%s\n",
opts->traddr, opts->trsvcid);
--
2.41.0
More information about the Linux-nvme
mailing list