summaryrefslogtreecommitdiff
path: root/NetworkPkg/IpSecDxe
diff options
context:
space:
mode:
authorFu Siyuan <siyuan.fu@intel.com>2015-09-17 00:55:10 +0000
committerhwu1225 <hwu1225@Edk2>2015-09-17 00:55:10 +0000
commitb175ea532fc48be3d926a6c1630138598904ad52 (patch)
tree1b1f590dabbff0ffad409432ee4db4509026ea22 /NetworkPkg/IpSecDxe
parent3d4bfa3c396c5b6e10652b03ea13238d45bc4abb (diff)
downloadedk2-platforms-b175ea532fc48be3d926a6c1630138598904ad52.tar.xz
NetworkPkg: TrafficDirection not saved in IPsecConfig.
Fix a bug that the TrafficDirection field is not saved in IPsecConfig.SetData. (Sync patch r18483 from main trunk.) 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/branches/UDK2015@18486 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'NetworkPkg/IpSecDxe')
-rw-r--r--NetworkPkg/IpSecDxe/IpSecConfigImpl.c14
-rw-r--r--NetworkPkg/IpSecDxe/IpSecImpl.h1
2 files changed, 9 insertions, 6 deletions
diff --git a/NetworkPkg/IpSecDxe/IpSecConfigImpl.c b/NetworkPkg/IpSecDxe/IpSecConfigImpl.c
index bd49245190..6aa47aabab 100644
--- a/NetworkPkg/IpSecDxe/IpSecConfigImpl.c
+++ b/NetworkPkg/IpSecDxe/IpSecConfigImpl.c
@@ -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 {
diff --git a/NetworkPkg/IpSecDxe/IpSecImpl.h b/NetworkPkg/IpSecDxe/IpSecImpl.h
index 8b63d24b52..89597bdc80 100644
--- a/NetworkPkg/IpSecDxe/IpSecImpl.h
+++ b/NetworkPkg/IpSecDxe/IpSecImpl.h
@@ -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;