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
This commit is contained in:
hhuan13 2010-08-20 06:29:55 +00:00
parent f6aa9c1bb5
commit 9e375eb11f
2 changed files with 3 additions and 11 deletions

View File

@ -297,6 +297,7 @@ Ip4CreateService (
//
IpSb->MaxPacketSize -= NET_VLAN_TAG_LEN;
}
IpSb->OldMaxPacketSize = IpSb->MaxPacketSize;
IpSb->MacString = NULL;
*Service = IpSb;

View File

@ -510,20 +510,11 @@ Ip4IpSecProcessPacket (
if (mIpSec == NULL) {
gBS->LocateProtocol (&gEfiIpSecProtocolGuid, NULL, (VOID **) &mIpSec);
if (mIpSec != NULL) {
//
// Save the original MTU
//
IpSb->OldMaxPacketSize = IpSb->MaxPacketSize;
}
}
//
// Check whether the IPsec protocol is available.
//
if (mIpSec == NULL) {
goto ON_EXIT;
}
}
//
// Check whether the IPsec enable variable is set.
//