iscsi-target: Implement iSCSI target IPv6 address printing.
The iSCSI target configfs code to print out an initiator's IPv6 address is not fully implemented. This patch uses snprintf() with the "%pI6c" format string to format the IPv6 address for display purposes. Signed-off-by: Chris Boot <bootc@bootc.net> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
This commit is contained in:
Родитель
c3c74c7a33
Коммит
6626a05726
|
@ -1013,19 +1013,9 @@ static int __iscsi_target_login_thread(struct iscsi_np *np)
|
||||||
ISCSI_LOGIN_STATUS_TARGET_ERROR);
|
ISCSI_LOGIN_STATUS_TARGET_ERROR);
|
||||||
goto new_sess_out;
|
goto new_sess_out;
|
||||||
}
|
}
|
||||||
#if 0
|
snprintf(conn->login_ip, sizeof(conn->login_ip), "%pI6c",
|
||||||
if (!iscsi_ntop6((const unsigned char *)
|
&sock_in6.sin6_addr.in6_u);
|
||||||
&sock_in6.sin6_addr.in6_u,
|
conn->login_port = ntohs(sock_in6.sin6_port);
|
||||||
(char *)&conn->ipv6_login_ip[0],
|
|
||||||
IPV6_ADDRESS_SPACE)) {
|
|
||||||
pr_err("iscsi_ntop6() failed\n");
|
|
||||||
iscsit_tx_login_rsp(conn, ISCSI_STATUS_CLS_TARGET_ERR,
|
|
||||||
ISCSI_LOGIN_STATUS_TARGET_ERROR);
|
|
||||||
goto new_sess_out;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
pr_debug("Skipping iscsi_ntop6()\n");
|
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
memset(&sock_in, 0, sizeof(struct sockaddr_in));
|
memset(&sock_in, 0, sizeof(struct sockaddr_in));
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче