fix critical bugs and improve iSCSI protocol compliance
- Fix nil pointer dereference in BindISCSISession when existSess is nil - Fix reversed logic in SPCLuOffline/SPCLuOnline (Online flag was swapped) - Use negotiated MaxXmitDataSegmentLength for response PDU segmentation (issue #41) - Fix debug log incorrectly using Warn level in SBCGetLbaStatus Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -38,7 +38,7 @@ func SPCIllegalOp(host int, cmd *api.SCSICommand) api.SAMStat {
|
||||
}
|
||||
|
||||
func SPCLuOffline(lu *api.SCSILu) error {
|
||||
lu.Attrs.Online = true
|
||||
lu.Attrs.Online = false
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ func SPCLuOnline(lu *api.SCSILu) error {
|
||||
return fmt.Errorf("lu prevent removal")
|
||||
}
|
||||
|
||||
lu.Attrs.Online = false
|
||||
lu.Attrs.Online = true
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user