frontend(iscsi): omit final CHAP auth echo

This commit is contained in:
pingqiu committed 2026-05-05 00:29:08 -07:00
1 parent 765e6edcef
commit d9cdab324d
2 files changed
+2 -3

No files matched your search

@@ -441,7 +441,6 @@ func (ln *LoginNegotiator) handleCHAPSecurity(req *Params, resp *PDU, respParams
return false
}
ln.chapOK = true
respParams.Set("AuthMethod", "CHAP")
return true
}
if alg, hasAlg := req.Get("CHAP_A"); hasAlg {
@@ -255,8 +255,8 @@ func TestLoginNegotiator_CHAP_ChallengeThenLoginOp(t *testing.T) {
if err != nil {
t.Fatalf("ParseParams round 3: %v", err)
}
if v, _ := resp3Params.Get("AuthMethod"); v != "CHAP" {
t.Fatalf("round 3 AuthMethod=%q want CHAP", v)
if v, ok := resp3Params.Get("AuthMethod"); ok {
t.Fatalf("round 3 AuthMethod=%q should not be echoed after CHAP_R", v)
}
if neg.Phase() != iscsi.LoginPhaseOperational {
t.Fatalf("phase=%v want Operational", neg.Phase())