diff options
-rw-r--r-- | drivers/scsi/libiscsi.c | 6 | ||||
-rw-r--r-- | include/scsi/libiscsi.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index e3995612ea76..40462415291e 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c | |||
@@ -2945,6 +2945,7 @@ void iscsi_conn_teardown(struct iscsi_cls_conn *cls_conn) | |||
2945 | free_pages((unsigned long) conn->data, | 2945 | free_pages((unsigned long) conn->data, |
2946 | get_order(ISCSI_DEF_MAX_RECV_SEG_LEN)); | 2946 | get_order(ISCSI_DEF_MAX_RECV_SEG_LEN)); |
2947 | kfree(conn->persistent_address); | 2947 | kfree(conn->persistent_address); |
2948 | kfree(conn->local_ipaddr); | ||
2948 | kfifo_in(&session->cmdpool.queue, (void*)&conn->login_task, | 2949 | kfifo_in(&session->cmdpool.queue, (void*)&conn->login_task, |
2949 | sizeof(void*)); | 2950 | sizeof(void*)); |
2950 | if (session->leadconn == conn) | 2951 | if (session->leadconn == conn) |
@@ -3269,6 +3270,8 @@ int iscsi_set_param(struct iscsi_cls_conn *cls_conn, | |||
3269 | sscanf(buf, "%d", &val); | 3270 | sscanf(buf, "%d", &val); |
3270 | session->discovery_sess = !!val; | 3271 | session->discovery_sess = !!val; |
3271 | break; | 3272 | break; |
3273 | case ISCSI_PARAM_LOCAL_IPADDR: | ||
3274 | return iscsi_switch_str_param(&conn->local_ipaddr, buf); | ||
3272 | default: | 3275 | default: |
3273 | return -ENOSYS; | 3276 | return -ENOSYS; |
3274 | } | 3277 | } |
@@ -3542,6 +3545,9 @@ int iscsi_conn_get_param(struct iscsi_cls_conn *cls_conn, | |||
3542 | case ISCSI_PARAM_TCP_RECV_WSF: | 3545 | case ISCSI_PARAM_TCP_RECV_WSF: |
3543 | len = sprintf(buf, "%u\n", conn->tcp_recv_wsf); | 3546 | len = sprintf(buf, "%u\n", conn->tcp_recv_wsf); |
3544 | break; | 3547 | break; |
3548 | case ISCSI_PARAM_LOCAL_IPADDR: | ||
3549 | len = sprintf(buf, "%s\n", conn->local_ipaddr); | ||
3550 | break; | ||
3545 | default: | 3551 | default: |
3546 | return -ENOSYS; | 3552 | return -ENOSYS; |
3547 | } | 3553 | } |
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h index 6ac9e17acdc4..309f51336fb9 100644 --- a/include/scsi/libiscsi.h +++ b/include/scsi/libiscsi.h | |||
@@ -231,6 +231,7 @@ struct iscsi_conn { | |||
231 | uint8_t ipv6_traffic_class; | 231 | uint8_t ipv6_traffic_class; |
232 | uint8_t ipv6_flow_label; | 232 | uint8_t ipv6_flow_label; |
233 | uint8_t is_fw_assigned_ipv6; | 233 | uint8_t is_fw_assigned_ipv6; |
234 | char *local_ipaddr; | ||
234 | 235 | ||
235 | /* MIB-statistics */ | 236 | /* MIB-statistics */ |
236 | uint64_t txdata_octets; | 237 | uint64_t txdata_octets; |