summaryrefslogtreecommitdiff
path: root/edk2/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c
diff options
context:
space:
mode:
authortye <tye@6f19259b-4bc3-4df7-8a09-765794883524>2009-11-11 07:06:27 +0000
committertye <tye@6f19259b-4bc3-4df7-8a09-765794883524>2009-11-11 07:06:27 +0000
commitdb8d67dae1e81716503e071f6e1d0dcbc89fa97e (patch)
treeedfa836953a244db523e5b4ba46611972fedbdc4 /edk2/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c
parent1451eee9d298d220509b2410c128b2d197dc356e (diff)
1. Add Link MTU support to IP4 and TCP4 driver.
2. Integrate IPsec functionality to IP4 driver. 3. Move IP_VERSION_4/IP_VERSION_6 definition from IpIoLib to NetLib. 4. Move the Ip6/Udp6 protocol declaration from driver INF to Library INF (DxeIpIoLib and DxeUdpIoLib) for better readability. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk@9413 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'edk2/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c')
-rw-r--r--edk2/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/edk2/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c b/edk2/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c
index 4788d403f..bb5b0ef11 100644
--- a/edk2/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c
+++ b/edk2/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c
@@ -13,6 +13,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include "Ip4Impl.h"
+EFI_IPSEC_PROTOCOL *mIpSec = NULL;
+
/**
Gets the current operational settings for this instance of the EFI IPv4 Protocol driver.
@@ -404,6 +406,8 @@ EfiIp4GetModeData (
Ip4ModeData->RouteTable = NULL;
Ip4ModeData->RouteCount = 0;
+ Ip4ModeData->MaxPacketSize = IpSb->MaxPacketSize;
+
//
// return the current station address for this IP child. So,
// the user can get the default address through this. Some
@@ -1765,6 +1769,13 @@ Ip4FreeTxToken (
Wrap = (IP4_TXTOKEN_WRAP *) Context;
//
+ // Signal IpSecRecycleEvent to inform IPsec free the memory
+ //
+ if (Wrap->IpSecRecycleSignal != NULL) {
+ gBS->SignalEvent (Wrap->IpSecRecycleSignal);
+ }
+
+ //
// Find the token in the instance's map. EfiIp4Transmit put the
// token to the map. If that failed, NetMapFindKey will return NULL.
//
@@ -1947,12 +1958,12 @@ EfiIp4Transmit (
}
Head.Fragment = IP4_HEAD_FRAGMENT_FIELD (DontFragment, FALSE, 0);
- HeadLen = sizeof (IP4_HEAD) + ((TxData->OptionsLength + 3) &~0x03);
+ HeadLen = (TxData->OptionsLength + 3) & (~0x03);
//
// If don't fragment and fragment needed, return error
//
- if (DontFragment && (TxData->TotalDataLength + HeadLen > IpSb->SnpMode.MaxPacketSize)) {
+ if (DontFragment && (TxData->TotalDataLength + HeadLen > IpSb->MaxPacketSize)) {
Status = EFI_BAD_BUFFER_SIZE;
goto ON_EXIT;
}