From 098e9f49256e352f557fdcbcfbab37f8dd89ff63 Mon Sep 17 00:00:00 2001 From: Fu Siyuan Date: Wed, 18 Sep 2013 02:27:20 +0000 Subject: Fix a bug in Ip4 driver that Ip4.Transmit() interface may return EFI_INVALID_PARAMETER without restore TPL. Signed-off-by: Fu Siyuan Reviewed-by: Ye Ting Reviewed-by: Jin Eric git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14682 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'MdeModulePkg/Universal/Network') diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c index 29f07ce4a3..cd01685a30 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c @@ -2002,7 +2002,8 @@ EfiIp4Transmit ( RawHdrLen = (UINT8) (RawHdrLen & 0x0f); if (RawHdrLen < 5) { - return EFI_INVALID_PARAMETER; + Status = EFI_INVALID_PARAMETER; + goto ON_EXIT; } RawHdrLen = (UINT8) (RawHdrLen << 2); @@ -2014,7 +2015,8 @@ EfiIp4Transmit ( DontFragment = IP4_DO_NOT_FRAGMENT (Head.Fragment); if (!DontFragment) { - return EFI_INVALID_PARAMETER; + Status = EFI_INVALID_PARAMETER; + goto ON_EXIT; } GateWay = IP4_ALLZERO_ADDRESS; -- cgit v1.2.3