Fix sending to many headers after completing CHAP auth.
TODO: see if this breaks something else.
This commit is contained in:
committed by
Ronnie Sahlberg
parent
81a7610155
commit
7d2e9ec708
+13
-9
@@ -55,8 +55,9 @@ iscsi_login_add_initiatorname(struct iscsi_context *iscsi, struct iscsi_pdu *pdu
|
|||||||
char str[MAX_STRING_SIZE+1];
|
char str[MAX_STRING_SIZE+1];
|
||||||
|
|
||||||
/* We only send InitiatorName during opneg or the first leg of secneg */
|
/* We only send InitiatorName during opneg or the first leg of secneg */
|
||||||
if (iscsi->current_phase != ISCSI_PDU_LOGIN_CSG_OPNEG
|
if ((iscsi->current_phase != ISCSI_PDU_LOGIN_CSG_OPNEG
|
||||||
&& iscsi->secneg_phase != ISCSI_LOGIN_SECNEG_PHASE_OFFER_CHAP) {
|
&& iscsi->secneg_phase != ISCSI_LOGIN_SECNEG_PHASE_OFFER_CHAP)
|
||||||
|
|| iscsi->secneg_phase != ISCSI_LOGIN_SECNEG_PHASE_OFFER_CHAP) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,8 +79,9 @@ iscsi_login_add_alias(struct iscsi_context *iscsi, struct iscsi_pdu *pdu)
|
|||||||
char str[MAX_STRING_SIZE+1];
|
char str[MAX_STRING_SIZE+1];
|
||||||
|
|
||||||
/* We only send InitiatorAlias during opneg or the first leg of secneg */
|
/* We only send InitiatorAlias during opneg or the first leg of secneg */
|
||||||
if (iscsi->current_phase != ISCSI_PDU_LOGIN_CSG_OPNEG
|
if ((iscsi->current_phase != ISCSI_PDU_LOGIN_CSG_OPNEG
|
||||||
&& iscsi->secneg_phase != ISCSI_LOGIN_SECNEG_PHASE_OFFER_CHAP) {
|
&& iscsi->secneg_phase != ISCSI_LOGIN_SECNEG_PHASE_OFFER_CHAP)
|
||||||
|
|| iscsi->secneg_phase != ISCSI_LOGIN_SECNEG_PHASE_OFFER_CHAP) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -102,8 +104,9 @@ iscsi_login_add_targetname(struct iscsi_context *iscsi, struct iscsi_pdu *pdu)
|
|||||||
char str[MAX_STRING_SIZE+1];
|
char str[MAX_STRING_SIZE+1];
|
||||||
|
|
||||||
/* We only send TargetName during opneg or the first leg of secneg */
|
/* We only send TargetName during opneg or the first leg of secneg */
|
||||||
if (iscsi->current_phase != ISCSI_PDU_LOGIN_CSG_OPNEG
|
if ((iscsi->current_phase != ISCSI_PDU_LOGIN_CSG_OPNEG
|
||||||
&& iscsi->secneg_phase != ISCSI_LOGIN_SECNEG_PHASE_OFFER_CHAP) {
|
&& iscsi->secneg_phase != ISCSI_LOGIN_SECNEG_PHASE_OFFER_CHAP)
|
||||||
|
|| iscsi->secneg_phase != ISCSI_LOGIN_SECNEG_PHASE_OFFER_CHAP) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -131,9 +134,10 @@ iscsi_login_add_sessiontype(struct iscsi_context *iscsi, struct iscsi_pdu *pdu)
|
|||||||
{
|
{
|
||||||
char str[MAX_STRING_SIZE+1];
|
char str[MAX_STRING_SIZE+1];
|
||||||
|
|
||||||
/* We only send TargetName during opneg or the first leg of secneg */
|
/* We only send SessionType during opneg or the first leg of secneg */
|
||||||
if (iscsi->current_phase != ISCSI_PDU_LOGIN_CSG_OPNEG
|
if ((iscsi->current_phase != ISCSI_PDU_LOGIN_CSG_OPNEG
|
||||||
&& iscsi->secneg_phase != ISCSI_LOGIN_SECNEG_PHASE_OFFER_CHAP) {
|
&& iscsi->secneg_phase != ISCSI_LOGIN_SECNEG_PHASE_OFFER_CHAP)
|
||||||
|
|| iscsi->secneg_phase != ISCSI_LOGIN_SECNEG_PHASE_OFFER_CHAP) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user