diff options
author | Michael Brown | 2006-12-06 20:53:56 +0100 |
---|---|---|
committer | Michael Brown | 2006-12-06 20:53:56 +0100 |
commit | 38ae94f8ce7d54368de2cd80730e79ce985b127b (patch) | |
tree | cf2f980ba64d963cabb865388ebb887176dae413 /src/net/tcp/iscsi.c | |
parent | Added write support for three-wire devices (e.g. the RTL8139 EEPROM) (diff) | |
download | ipxe-38ae94f8ce7d54368de2cd80730e79ce985b127b.tar.gz ipxe-38ae94f8ce7d54368de2cd80730e79ce985b127b.tar.xz ipxe-38ae94f8ce7d54368de2cd80730e79ce985b127b.zip |
A cleaner method of handling login redirection; just use the existing
reconnection mechanism. This avoids the problems of trying to reuse
the TCP connection structure before the old connection has cleanly exited.
Diffstat (limited to 'src/net/tcp/iscsi.c')
-rw-r--r-- | src/net/tcp/iscsi.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/net/tcp/iscsi.c b/src/net/tcp/iscsi.c index 424bbcf4..665b9765 100644 --- a/src/net/tcp/iscsi.c +++ b/src/net/tcp/iscsi.c @@ -735,8 +735,11 @@ static void iscsi_rx_login_response ( struct iscsi_session *iscsi, void *data, /* Check for login redirection */ if ( response->status_class == ISCSI_STATUS_REDIRECT ) { DBG ( "iSCSI %p redirecting to new server\n", iscsi ); - iscsi_close ( iscsi, -EINPROGRESS ); - tcp_connect ( &iscsi->tcp ); + /* Close the TCP connection; our TCP closed() method + * will take care of the reconnection once this + * connection has been cleanly terminated. + */ + tcp_close ( &iscsi->tcp ); return; } |