]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[iscsi] Ensure ISID is consistent within an iSCSI session
authorMichael Brown <mcb30@ipxe.org>
Mon, 18 Oct 2010 13:37:11 +0000 (14:37 +0100)
committerMichael Brown <mcb30@ipxe.org>
Mon, 18 Oct 2010 13:40:27 +0000 (14:40 +0100)
commit19c59bb1317e58c44ce606dadbd0ee8dcfcf19ac
treec2b1cd12fdeaac0fa22634cfe69c885011a2ca82
parent44dbf0e03686b317054a47068bfde23b43b8eb8d
[iscsi] Ensure ISID is consistent within an iSCSI session

Commit 5f4ab0d ("[iscsi] Randomise a portion of the ISID to force new
session instantiation") introduced a regression by randomising the
ISID on each call to iscsi_start_login(), which may be called more
than once per connection, rather than on each call to
iscsi_open_connection(), which is guaranteed to be called only once
per connection.  This is incorrect behaviour that causes our
connection to be rejected by some iSCSI targets (observed with a
COMSTAR target under OpenSolaris).

Fix by generating the ISID in iscsi_open_connection(), and storing the
randomised ISID as part of the session state.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/include/ipxe/iscsi.h
src/net/tcp/iscsi.c