diff options
author | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-01-16 23:33:48 -0800 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-01-18 08:35:58 +0000 |
commit | 2f9bc894c67dbacae5a6a9875818d2a18a918d18 (patch) | |
tree | 2891680fbe0b57299776d44123969452a9cb1a25 /drivers/target/iscsi/iscsi_target_core.h | |
parent | 4949314c7283ea4f9ade182ca599583b89f7edd6 (diff) | |
download | op-kernel-dev-2f9bc894c67dbacae5a6a9875818d2a18a918d18.zip op-kernel-dev-2f9bc894c67dbacae5a6a9875818d2a18a918d18.tar.gz |
iscsi-target: Fix discovery with INADDR_ANY and IN6ADDR_ANY_INIT
This patch addresses a bug with sendtargets discovery where INADDR_ANY (0.0.0.0)
+ IN6ADDR_ANY_INIT ([0:0:0:0:0:0:0:0]) network portals where incorrectly being
reported back to initiators instead of the address of the connecting interface.
To address this, save local socket ->getname() output during iscsi login setup,
and makes iscsit_build_sendtargets_response() return these TargetAddress keys
when INADDR_ANY or IN6ADDR_ANY_INIT portals are in use.
Reported-by: Dax Kelson <dkelson@gurulabs.com>
Reported-by: Andy Grover <agrover@redhat.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: <stable@vger.kernel.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/iscsi/iscsi_target_core.h')
-rw-r--r-- | drivers/target/iscsi/iscsi_target_core.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/target/iscsi/iscsi_target_core.h b/drivers/target/iscsi/iscsi_target_core.h index ebf81fd..0ec3b77 100644 --- a/drivers/target/iscsi/iscsi_target_core.h +++ b/drivers/target/iscsi/iscsi_target_core.h @@ -508,6 +508,7 @@ struct iscsi_conn { u16 cid; /* Remote TCP Port */ u16 login_port; + u16 local_port; int net_size; u32 auth_id; #define CONNFLAG_SCTP_STRUCT_FILE 0x01 @@ -527,6 +528,7 @@ struct iscsi_conn { unsigned char bad_hdr[ISCSI_HDR_LEN]; #define IPV6_ADDRESS_SPACE 48 unsigned char login_ip[IPV6_ADDRESS_SPACE]; + unsigned char local_ip[IPV6_ADDRESS_SPACE]; int conn_usage_count; int conn_waiting_on_uc; atomic_t check_immediate_queue; |