diff options
| author | Chris Boot <bootc@bootc.net> | 2011-08-14 01:10:46 -0400 |
|---|---|---|
| committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2011-08-22 15:26:29 -0400 |
| commit | 6626a0572657a0945a7b9ccf4a6d6ad1750f9adc (patch) | |
| tree | 65db4e143b121c6dbb101f1a076b943bb91a4a8f /drivers | |
| parent | c3c74c7a33d837be391ab61aaae39bb21f16736a (diff) | |
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>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/target/iscsi/iscsi_target_login.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/drivers/target/iscsi/iscsi_target_login.c b/drivers/target/iscsi/iscsi_target_login.c index bcaf82f47037..daad362a93ce 100644 --- a/drivers/target/iscsi/iscsi_target_login.c +++ b/drivers/target/iscsi/iscsi_target_login.c | |||
| @@ -1013,19 +1013,9 @@ static int __iscsi_target_login_thread(struct iscsi_np *np) | |||
| 1013 | ISCSI_LOGIN_STATUS_TARGET_ERROR); | 1013 | ISCSI_LOGIN_STATUS_TARGET_ERROR); |
| 1014 | goto new_sess_out; | 1014 | goto new_sess_out; |
| 1015 | } | 1015 | } |
| 1016 | #if 0 | 1016 | snprintf(conn->login_ip, sizeof(conn->login_ip), "%pI6c", |
| 1017 | if (!iscsi_ntop6((const unsigned char *) | 1017 | &sock_in6.sin6_addr.in6_u); |
| 1018 | &sock_in6.sin6_addr.in6_u, | 1018 | conn->login_port = ntohs(sock_in6.sin6_port); |
| 1019 | (char *)&conn->ipv6_login_ip[0], | ||
| 1020 | IPV6_ADDRESS_SPACE)) { | ||
| 1021 | pr_err("iscsi_ntop6() failed\n"); | ||
| 1022 | iscsit_tx_login_rsp(conn, ISCSI_STATUS_CLS_TARGET_ERR, | ||
| 1023 | ISCSI_LOGIN_STATUS_TARGET_ERROR); | ||
| 1024 | goto new_sess_out; | ||
| 1025 | } | ||
| 1026 | #else | ||
| 1027 | pr_debug("Skipping iscsi_ntop6()\n"); | ||
| 1028 | #endif | ||
| 1029 | } else { | 1019 | } else { |
| 1030 | memset(&sock_in, 0, sizeof(struct sockaddr_in)); | 1020 | memset(&sock_in, 0, sizeof(struct sockaddr_in)); |
| 1031 | 1021 | ||
