Commit Graph

44 Commits

Author SHA1 Message Date
Laszlo Ersek aa5fc205dd NetworkPkg: IpSecDxe: remove set but unused variables
Cc: Siyuan Fu <siyuan.fu@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
2016-03-25 10:52:31 +01:00
Zhang Lubo ce22514e48 NetworkPkg:Fix Network memory leak when calling GetModeData interface
Multiple network protocols have a GetModeData() interface, which may
allocate memory resource in the return mode data structure. It's
callers responsibility to free these buffers.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19758 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-28 02:32:43 +00:00
Jiaxin Wu 4991eeffcd NetworkPkg: Fix IpSec SPD and SAD mapping issue when SPD is updated
The current implementation doesn't handle the relationship between
SPD and SAD well, which may introduce some security and connection
issue after SPD updated.
For SPD SetData policy:
 A) When delete the existed SPD entry, its related SAs also should be
removed from its Sas list(SadEntry->BySpd). If the SA entry is
established by IKE, we can remove it from global SAD list(SadEntry->List)
and then free it directly since its SpdEntry will be freed later.
 B) SPD SetData operation should do some setting date validity-check.
For example, whether the SaId specified by setting Data is valid. If
the setting date is invalid, EFI_INVALID_PARAMETER should be returned.

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19652 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-18 01:59:16 +00:00
Hao Wu 682c9b4afe NetworkPkg IpSecDxe: Fix a typo in function description
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19600 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-06 01:12:07 +00:00
Jordan Justen b55fecfee6 NetworkPkg: Convert all .uni files to utf-8
To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py NetworkPkg

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19258 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-15 04:56:57 +00:00
Jiaxin Wu 2f667c5488 NetworkPkg: Fix connection issue after correct SPD and re-enable IPsec
This patch is used to fix connection failure issue after correct the SPD
and re-enable IPsec. The driver should not update the SadEntry's SpdSelector
when doing SpdEntry modification. SadEntry's SpdSelector may not equal to
this edited SpdEntry’s Selector.

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18484 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-16 09:02:48 +00:00
Fu Siyuan 96702f88a3 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
2015-09-16 08:52:43 +00:00
Jiaxin Wu 60cbd7fb2e NetworkPkg: Fix IpSec run into infinite loop issue in some case
v2:
* Update the copyright year and conditional judgment for removing.

When edit one SPEntry in SPD database, the corresponding SA entry will
be updated to the sas list of the new SPD entry. But before that, all
of them should be removed from the original sas list. If not, the list
will be broken into infinite loop.

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18352 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-28 07:00:32 +00:00
Jiaxin Wu 5dd08a463d NetworkPkg: Fix hang issue after system reconnected when IPSec has set up
IpSecStop() is incompetent to send out the delete information since the underlying
IP child has been destroyed. Delete all established IKE SAs and related
Child SAs directly.

Cc: Ye Ting <ting.ye@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18223 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-14 07:41:51 +00:00
Bruce Cran 0231883b57 NetworkPkg: Fix bug in IpSecImpl.c caused by missing parentheses
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Bruce Cran <bruce@cran.org.uk>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
[lersek@redhat.com: updated patch based on Siyuan's feedback]
Signed-off-by: Laszlo Ersek <lersek@redhat.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18045 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-26 08:03:05 +00:00
jiaxinwu 395616868f NetworkPkg: Remove IpSecDxe and Ip4Config Protocol dependency.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: jiaxinwu <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17874 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-08 03:09:28 +00:00
Hao Wu 532d26a002 NetworkPkg: Remove mZeroGuid definition in IpSecDxe
mZeroGuid is defined but not used in IpSecDxe. All the header files in
IpSecDxe which expose mZeroGuid are not included externally as well.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17842 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-07 03:03:21 +00:00
Samer El-Haj-Mahmoud e8837eddf3 NetworkPkg: Remove unused variables from IpSecDxe to fix GCC build.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hp.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17773 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-01 03:35:32 +00:00
Shumin Qiu 5edac28e83 NetworkPkg: Fix typo.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Shumin Qiu <shumin.qiu@intel.com>
Reviewed-by: Ting Ye <ting.ye@intel.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
Reviewed-by: Mudusuru Giri P <giri.p.mudusuru@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17049 6f19259b-4bc3-4df7-8a09-765794883524
2015-03-16 01:46:32 +00:00
Gao, Liming 537dafa90a NetworkPkg: Convert non DOS format files to DOS format
Module UNI and Package UNI files are not DOS format. Convert them to DOS format.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gao, Liming <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16049 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-03 08:50:27 +00:00
Dong, Guo 332be0dbfa NetworkPkg: INF/DEC file updates to EDK II packages
2. Add MODULE_UNI_FILE file that contains the localized Abstract and Description of a module.
a. Addresses an information gap between INF files and the UEFI Distribution Packaging Specification XML schema
b. There will be an associated update to UPT in BaseTools to consume MODULE_UNI_FILE and associated UNI file during UDP creation that performs the INF -> XML conversion.
c. There will be an associated update to UPT in BaseTools to produce MODULE_UNI_FILE and associated UNI file during UDP installation that performs the XML -> INF conversion.

3. Add Module Extra UNI file that provides the localized Name of a module.
a. [UserExtensions.TianoCore."ExtraFiles"] provides an easy method for a module to specify extra files not listed in [Sources] or [Binaries] sections to be added to a UDP without having to list the files in the UPT package information data file.
b. There will be an associated update to UPT in BaseTools to package up files listed in [UserExtensions.TianoCore."ExtraFiles"] during UDP creation.
c. UNI file contains localized name of a module to go along with the localized Abstract and Description from the MODULE_UNI_FILE.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dong, Guo <guo.dong@intel.com>
Reviewed-by: Gao, Liming <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15947 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-28 05:26:24 +00:00
Dong, Guo 8ef3af3967 NetworkPkg: INF/DEC file updates to EDK II packages
1. Usage information in INF file comment blocks are either incomplete or incorrect.  
This includes usage information for Protocols/PPIs/GUIDs/PCDs/HOBs/Events/BootModes.  
The syntax for usage information in comment blocks is defined in the EDK II Module Information (INF) Specification

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dong, Guo <guo.dong@intel.com>
Reviewed-by: Gao, Liming <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15946 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-28 05:23:58 +00:00
Fu, Siyuan 2922e29ad8 Update network stack code to use StrnCpy instead of StrCpy.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu, Siyuan <siyuan.fu@intel.com>
Reviewed-By: Dong, Eric <eric.dong@intel.com>
Reviewed-by: Wu, Jiaxin <jiaxin.wu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15773 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-08 00:41:14 +00:00
Eric Dong 94866d4035 Update code to support VS2013 tool chain.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15693 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-28 07:43:23 +00:00
Eric Dong 393a3169c2 Refine code to make it more safely.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>




git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15589 6f19259b-4bc3-4df7-8a09-765794883524
2014-06-25 05:44:37 +00:00
Tian, Hot 44de1013cf Fix CRLF format
Signed-off-by: Tian, Hot <hot.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15157 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-22 08:39:32 +00:00
Fu Siyuan 979fc9eab5 Bug fix: IpSec driver treats BOOLEAN as EFI_STATUS in error handling code.
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Dong, Guo <guo.dong@intel.com>
Reviewed-by: Jin, Eric <eric.jin@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15049 6f19259b-4bc3-4df7-8a09-765794883524
2014-01-06 03:01:09 +00:00
sfu5 6879581d2e Update dual network stack drivers to produce multiple Driver Binding Protocol.
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Ouyang Qian <qian.ouyang@intel.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14315 6f19259b-4bc3-4df7-8a09-765794883524
2013-04-25 01:33:43 +00:00
sfu5 216f79703b 1. Add EFI_COMPONENT_NAME2_PROTOCOL.GetControllerName() support.
2. Fix the driver binding Stop() hang issue in the network stack.
3. Add Ip4 raw data support.
4. Add iSCSI Dhcp option 60 support.

Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Ouyang Qian <qian.ouyang@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13995 6f19259b-4bc3-4df7-8a09-765794883524
2012-12-13 06:47:06 +00:00
qianouyang 1a6fdcb009 Fix code potential errors in IPsec.
Signed-off-by: qianouyang
Reviewed-by:  ydong10



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13856 6f19259b-4bc3-4df7-8a09-765794883524
2012-10-17 05:46:53 +00:00
lzeng14 ce68d3bc68 Add missing braces around initializer.
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Qian Ouyang <qian.ouyang@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13817 6f19259b-4bc3-4df7-8a09-765794883524
2012-10-11 02:15:23 +00:00
qianouyang 4b0f5775e7 Fix a ECC error - the parameter's name in comments is inconsistent with the one in Function's.
Signed-off-by: qianouyang
Reviewed-by: ydong10



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12815 6f19259b-4bc3-4df7-8a09-765794883524
2011-12-05 03:17:15 +00:00
qianouyang 6cf9230ff2 1.Update IPsec driver to set the Transform structure’s Next Payload field to be zero when it is the last transform structure in a proposal. The same as Proposal Structure’s Next Payload filed, it also should be zero when it is the last proposal in the SA.
2.Delete all SAs in the IPsec->Stop().

Signed-off-by: qianouyang
Reviewed-by: sfu5

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12768 6f19259b-4bc3-4df7-8a09-765794883524
2011-11-23 10:31:04 +00:00
sfu5 02a758cb0b Add pointer check for NULL before dereference it.
Signed-off-by: sfu5
Reviewed-by: xdu2
Reviewed-by: ydong10


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12514 6f19259b-4bc3-4df7-8a09-765794883524
2011-10-08 02:55:30 +00:00
qianouyang 4cb0548d01 Before decrypting the packet, Ipsec will check if the inbound protected packet is mal-format. If yes, discard it.
Signed-off-by: qianouyang
Reviewed-by: zhangchaointel jyao1

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12464 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-28 03:20:22 +00:00
lgao4 9bdc659213 Clean up the private GUID definition in module Level.
0. Remove the unused private GUID from module source files.
1. Use gEfiCallerIdGuid replace of the private module GUID.
2. Add the public header files to define HII FormSet and PackageList GUID used in every HII driver.

Signed-off-by: lgao4
Reviewed-by: ydong10 gdong1 tye jfan12 wli12 rsun3 jyao1 ftian



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12376 6f19259b-4bc3-4df7-8a09-765794883524
2011-09-18 12:27:49 +00:00
niruiyu 15ee13fca7 Fix the comments to follow UEFI Spec regarding how to check an EFI_HANDLE is valid/invalid.
Signed-off-by: niruiyu
Reviewed-by: lgao4

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11979 6f19259b-4bc3-4df7-8a09-765794883524
2011-07-05 09:21:22 +00:00
qianouyang 94b928ca59 1. In IPv4 and IPv6 driver, before calling IPsec, a new NET_FRAGMENT structure is allocated and then passed to IPsec, it should be released after it is done to avoid the memory leak.
2. In IPsec driver it wrongly use the HeadLen to calculate the IP header length after the IPsec process. Correct this mistake.

Signed-off-by: qianouyang
Reviewed-by: jjin9
Reviewed-by: ZhangCaoIntel

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11824 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-14 09:45:59 +00:00
qianouyang 47b2710184 Update the IPsec driver to check in invalid parameter of ProcessExt() according to UEFI Spec.
Signed-off-by: qianouyang
Reviewed-by: jjin9

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11714 6f19259b-4bc3-4df7-8a09-765794883524
2011-05-31 02:03:57 +00:00
qianouyang 0a7294f7a1 Update the relevant drivers to use the correct GUID for EFI_IPSEC2_PROTOCOL.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11576 6f19259b-4bc3-4df7-8a09-765794883524
2011-04-20 10:01:48 +00:00
xdu2 76389e18c0 NetworkPkg: comments clean up.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11263 6f19259b-4bc3-4df7-8a09-765794883524
2011-01-21 08:00:22 +00:00
xdu2 686d4d4a86 NetworkPkg: Add IN/OUT modifier.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11262 6f19259b-4bc3-4df7-8a09-765794883524
2011-01-21 05:18:29 +00:00
xdu2 2e7120cd37 NetworkPkg-IpSecDxe: Remove extra space in function type definition to beautify doxygen output.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11259 6f19259b-4bc3-4df7-8a09-765794883524
2011-01-20 10:22:46 +00:00
qianouyang bfd4204b2d NetworkPkg: Update the IpsecDxe driver related PCDs in NetworkPkg.dec.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11258 6f19259b-4bc3-4df7-8a09-765794883524
2011-01-20 08:44:28 +00:00
jljusten 1d8fa5e94f NetworkPkg/IpSecDxe: Add missing EFIAPI for callback functions
Callback functions must always use EFIAPI.

GCC 4.4 X64 flagged these mismatches in EFIAPI usage.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11221 6f19259b-4bc3-4df7-8a09-765794883524
2011-01-03 03:17:20 +00:00
qianouyang 911302d531 Fix build issue.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11220 6f19259b-4bc3-4df7-8a09-765794883524
2011-01-01 08:45:57 +00:00
qianouyang 9166f840d2 Add IPsec/Ikev2 support.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11219 6f19259b-4bc3-4df7-8a09-765794883524
2010-12-31 10:43:54 +00:00
xdu2 68d3f2fb61 1. Update IPsec driver to produce EFI_IPSEC2_PROTOCOL which is defined by UEFI errata that will appear in UEFI 2.3 specification after 2.3 errata B and future UEFI Specifications after 2.3.
2. Update IPv6 driver to consume the EFI_IPSEC2_PROTOCOL.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10991 6f19259b-4bc3-4df7-8a09-765794883524
2010-11-01 08:19:28 +00:00
hhtian a3bcde70e6 Add NetworkPkg (P.UDK2010.UP3.Network.P1)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10986 6f19259b-4bc3-4df7-8a09-765794883524
2010-11-01 06:13:54 +00:00