summaryrefslogtreecommitdiff
path: root/include/target
diff options
context:
space:
mode:
authorAndy Grover <agrover@redhat.com>2015-08-24 10:26:05 -0700
committerNicholas Bellinger <nab@linux-iscsi.org>2015-08-26 23:27:20 -0700
commitdc58f760e2e1f8f2265b581d35f211415c4fee0c (patch)
tree51c9f16dbef07bd5a931a12a026661e606b865b0 /include/target
parent69d755747d31c07a416064f251c2f408938fb67a (diff)
target/iscsi: Replace conn->login_ip with login_sockaddr
Very similar to how it went with local_sockaddr. It was embedded in iscsi_login_stats so some changes there, and we needed to copy in a sockaddr_storage comparison function. Hopefully the kernel will get a standard one soon, our implementation makes the 3rd. isert_set_conn_info() became much smaller. IPV6_ADDRESS_SPACE define goes away, had to modify a call to in6_pton(), can just use -1 since we are sure string is null-terminated. Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'include/target')
-rw-r--r--include/target/iscsi/iscsi_target_core.h3
-rw-r--r--include/target/iscsi/iscsi_target_stat.h2
2 files changed, 2 insertions, 3 deletions
diff --git a/include/target/iscsi/iscsi_target_core.h b/include/target/iscsi/iscsi_target_core.h
index b9434117785f..f3eb99809557 100644
--- a/include/target/iscsi/iscsi_target_core.h
+++ b/include/target/iscsi/iscsi_target_core.h
@@ -528,8 +528,7 @@ struct iscsi_conn {
u32 exp_statsn;
/* Per connection status sequence number */
u32 stat_sn;
-#define IPV6_ADDRESS_SPACE 48
- unsigned char login_ip[IPV6_ADDRESS_SPACE];
+ struct __kernel_sockaddr_storage login_sockaddr;
struct __kernel_sockaddr_storage local_sockaddr;
int conn_usage_count;
int conn_waiting_on_uc;
diff --git a/include/target/iscsi/iscsi_target_stat.h b/include/target/iscsi/iscsi_target_stat.h
index 3ff76b4faad3..f2a583cdf08b 100644
--- a/include/target/iscsi/iscsi_target_stat.h
+++ b/include/target/iscsi/iscsi_target_stat.h
@@ -50,7 +50,7 @@ struct iscsi_login_stats {
u64 last_fail_time; /* time stamp (jiffies) */
u32 last_fail_type;
int last_intr_fail_ip_family;
- unsigned char last_intr_fail_ip_addr[IPV6_ADDRESS_SPACE];
+ struct __kernel_sockaddr_storage last_intr_fail_sockaddr;
char last_intr_fail_name[224];
} ____cacheline_aligned;