Fix a bug in Ip4 driver that Ip4.Transmit() interface may return EFI_INVALID_PARAMETER without restore TPL.

Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Jin Eric <eric.jin@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14682 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Fu Siyuan 2013-09-18 02:27:20 +00:00 committed by sfu5
parent df202d72eb
commit 098e9f4925
1 changed files with 4 additions and 2 deletions

View File

@ -2002,7 +2002,8 @@ EfiIp4Transmit (
RawHdrLen = (UINT8) (RawHdrLen & 0x0f); RawHdrLen = (UINT8) (RawHdrLen & 0x0f);
if (RawHdrLen < 5) { if (RawHdrLen < 5) {
return EFI_INVALID_PARAMETER; Status = EFI_INVALID_PARAMETER;
goto ON_EXIT;
} }
RawHdrLen = (UINT8) (RawHdrLen << 2); RawHdrLen = (UINT8) (RawHdrLen << 2);
@ -2014,7 +2015,8 @@ EfiIp4Transmit (
DontFragment = IP4_DO_NOT_FRAGMENT (Head.Fragment); DontFragment = IP4_DO_NOT_FRAGMENT (Head.Fragment);
if (!DontFragment) { if (!DontFragment) {
return EFI_INVALID_PARAMETER; Status = EFI_INVALID_PARAMETER;
goto ON_EXIT;
} }
GateWay = IP4_ALLZERO_ADDRESS; GateWay = IP4_ALLZERO_ADDRESS;