summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhhuan13 <hhuan13@6f19259b-4bc3-4df7-8a09-765794883524>2010-08-20 06:29:55 +0000
committerhhuan13 <hhuan13@6f19259b-4bc3-4df7-8a09-765794883524>2010-08-20 06:29:55 +0000
commit9e375eb11f5ad03f8d13357be232077879971cab (patch)
tree59ebb51ccdf370eeca9b4965995f28c259ffdaf7
parentf6aa9c1bb5201de511e9394397d8fc9315b106e2 (diff)
downloadedk2-platforms-9e375eb11f5ad03f8d13357be232077879971cab.tar.xz
Fixed Ip4 bug that causing Iscsi reconnect hang sporadically . In Ip4OutPut()->Ip4IpSecProcessPacket() line 511, each time "reconnect -r", IpSb is re-allocated in IpDriver.Start(). But only when the first time, IpSb->OldMaxPacketSize = IpSb->MaxPacketSize; For the sequential reconnect, IpSb->OldMaxPacketSize is left dirty. Somtimes it is 0, causing the next sending packages generate exception.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10810 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.c1
-rw-r--r--MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.c13
2 files changed, 3 insertions, 11 deletions
diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.c
index b3a877c9ef..18be21846d 100644
--- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.c
+++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.c
@@ -297,6 +297,7 @@ Ip4CreateService (
//
IpSb->MaxPacketSize -= NET_VLAN_TAG_LEN;
}
+ IpSb->OldMaxPacketSize = IpSb->MaxPacketSize;
IpSb->MacString = NULL;
*Service = IpSb;
diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.c
index d888e18e4c..75333b82ef 100644
--- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.c
+++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.c
@@ -510,21 +510,12 @@ Ip4IpSecProcessPacket (
if (mIpSec == NULL) {
gBS->LocateProtocol (&gEfiIpSecProtocolGuid, NULL, (VOID **) &mIpSec);
- if (mIpSec != NULL) {
- //
- // Save the original MTU
- //
- IpSb->OldMaxPacketSize = IpSb->MaxPacketSize;
+ if (mIpSec == NULL) {
+ goto ON_EXIT;
}
}
//
- // Check whether the IPsec protocol is available.
- //
- if (mIpSec == NULL) {
- goto ON_EXIT;
- }
- //
// Check whether the IPsec enable variable is set.
//
if (mIpSec->DisabledFlag) {