From db8d67dae1e81716503e071f6e1d0dcbc89fa97e Mon Sep 17 00:00:00 2001 From: tye Date: Wed, 11 Nov 2009 07:06:27 +0000 Subject: 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 --- edk2/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'edk2/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c') 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 @@ -1764,6 +1768,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; } -- cgit v1.2.3