mirror of https://github.com/acidanthera/audk.git
NetworkPkg: Fix issue the iSCSI client can not send reset packet.
if we already established a iSCSI connection from initiator to target based on IPv4 stack, after using reconnect -r command, we can not rebuild the session with the windows target, since the server thought the session is still exist. This issue is caused by wrong place of acquire ownership of sock lock which lead the iSCSI can not reset the connection correctly. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <lubo.zhang@intel.com> Cc: Wu Jiaxin <jiaxin.wu@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
This commit is contained in:
parent
e3793f9834
commit
597cf8a19f
|
@ -169,18 +169,6 @@ SockDestroyChild (
|
|||
|
||||
ASSERT (Tcb != NULL);
|
||||
|
||||
Status = EfiAcquireLockOrFail (&(Sock->Lock));
|
||||
if (EFI_ERROR (Status)) {
|
||||
|
||||
DEBUG (
|
||||
(EFI_D_ERROR,
|
||||
"SockDestroyChild: Get the lock to access socket failed with %r\n",
|
||||
Status)
|
||||
);
|
||||
|
||||
return EFI_ACCESS_DENIED;
|
||||
}
|
||||
|
||||
//
|
||||
// Close the IP protocol.
|
||||
//
|
||||
|
@ -226,6 +214,19 @@ SockDestroyChild (
|
|||
NULL
|
||||
);
|
||||
|
||||
|
||||
Status = EfiAcquireLockOrFail (&(Sock->Lock));
|
||||
if (EFI_ERROR (Status)) {
|
||||
|
||||
DEBUG (
|
||||
(EFI_D_ERROR,
|
||||
"SockDestroyChild: Get the lock to access socket failed with %r\n",
|
||||
Status)
|
||||
);
|
||||
|
||||
return EFI_ACCESS_DENIED;
|
||||
}
|
||||
|
||||
//
|
||||
// force protocol layer to detach the PCB
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue