mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 18:17:16 +01:00
frontend(iscsi): echo CHAP auth method after verification
This commit is contained in:
1 parent
f8b5701594
commit
eda93ba5ba
2 files changed
+8
No files matched your search
@@ -435,6 +435,7 @@ func (ln *LoginNegotiator) handleCHAPSecurity(req *Params, resp *PDU, respParams
|
||||
return false
|
||||
}
|
||||
ln.chapOK = true
|
||||
respParams.Set("AuthMethod", "CHAP")
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
@@ -235,6 +235,13 @@ func TestLoginNegotiator_CHAP_ChallengeThenLoginOp(t *testing.T) {
|
||||
t.Fatalf("round 2 status=0x%02x detail=0x%02x",
|
||||
resp2.LoginStatusClass(), resp2.LoginStatusDetail())
|
||||
}
|
||||
resp2Params, err := iscsi.ParseParams(resp2.DataSegment)
|
||||
if err != nil {
|
||||
t.Fatalf("ParseParams round 2: %v", err)
|
||||
}
|
||||
if v, _ := resp2Params.Get("AuthMethod"); v != "CHAP" {
|
||||
t.Fatalf("round 2 AuthMethod=%q want CHAP", v)
|
||||
}
|
||||
if neg.Phase() != iscsi.LoginPhaseOperational {
|
||||
t.Fatalf("phase=%v want Operational", neg.Phase())
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user