NetworkPkg: TrafficDirection not saved in IPsecConfig.

Fix a bug that the TrafficDirection field is not saved in IPsecConfig.SetData.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18483 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Fu Siyuan 2015-09-16 08:52:43 +00:00 committed by sfu5
parent a8706acb0e
commit 96702f88a3
2 changed files with 9 additions and 6 deletions

View File

@ -1167,9 +1167,10 @@ SetSpdEntry (
SpdData->Name,
sizeof (SpdData->Name)
);
SpdEntry->Data->PackageFlag = SpdData->PackageFlag;
SpdEntry->Data->Action = SpdData->Action;
SpdEntry->Data->PackageFlag = SpdData->PackageFlag;
SpdEntry->Data->TrafficDirection = SpdData->TrafficDirection;
SpdEntry->Data->Action = SpdData->Action;
//
// Fix the address of ProcessingPolicy and copy it if need, which is continous
// memory and close to the base structure of SAD data.
@ -1690,9 +1691,10 @@ GetSpdEntry (
//
CopyMem (SpdData->Name, SpdEntry->Data->Name, sizeof (SpdData->Name));
SpdData->PackageFlag = SpdEntry->Data->PackageFlag;
SpdData->Action = SpdEntry->Data->Action;
SpdData->PackageFlag = SpdEntry->Data->PackageFlag;
SpdData->TrafficDirection = SpdEntry->Data->TrafficDirection;
SpdData->Action = SpdEntry->Data->Action;
if (SpdData->Action != EfiIPsecActionProtect) {
SpdData->ProcessingPolicy = NULL;
} else {

View File

@ -76,6 +76,7 @@ typedef struct _EFI_ESP_TAIL {
struct _IPSEC_SPD_DATA {
CHAR16 Name[100];
UINT32 PackageFlag;
EFI_IPSEC_TRAFFIC_DIR TrafficDirection;
EFI_IPSEC_ACTION Action;
EFI_IPSEC_PROCESS_POLICY *ProcessingPolicy;
LIST_ENTRY Sas;