Skip to content

Commit

Permalink
Update the relevant drivers to use the correct GUID for EFI_IPSEC2_PR…
Browse files Browse the repository at this point in the history
…OTOCOL.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11576 6f19259b-4bc3-4df7-8a09-765794883524
  • Loading branch information
qianouyang committed Apr 20, 2011
1 parent a33f9a7 commit 0a7294f
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,5 @@
gEfiIp4ServiceBindingProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiManagedNetworkProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiArpProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiIpSecProtocolGuid
gEfiIpSec2ProtocolGuid # PROTOCOL ALWAYS_CONSUMED

2 changes: 1 addition & 1 deletion MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ Ip4IpSecProcessPacket (
ZeroMem (&ZeroHead, sizeof (IP4_HEAD));

if (mIpSec == NULL) {
gBS->LocateProtocol (&gEfiIpSecProtocolGuid, NULL, (VOID **) &mIpSec);
gBS->LocateProtocol (&gEfiIpSec2ProtocolGuid, NULL, (VOID **) &mIpSec);
if (mIpSec == NULL) {
goto ON_EXIT;
}
Expand Down
2 changes: 1 addition & 1 deletion NetworkPkg/Application/IpsecConfig/IpSecConfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ InitializeIpSecConfig (
goto Done;
}

Status = LocateProtocol (&gEfiIpSecProtocolGuid, (VOID **) &mIpSec);
Status = LocateProtocol (&gEfiIpSec2ProtocolGuid, (VOID **) &mIpSec);
if (EFI_ERROR (Status) || mIpSec == NULL) {
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_IPSEC_CONFIG_PROTOCOL_INEXISTENT), mHiiHandle, mAppName);
goto Done;
Expand Down
2 changes: 1 addition & 1 deletion NetworkPkg/Application/IpsecConfig/IpSecConfig.inf
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@
UefiLib

[Protocols]
gEfiIpSecProtocolGuid ##CONSUMS
gEfiIpSec2ProtocolGuid ##CONSUMS
gEfiIpSecConfigProtocolGuid ##CONSUMS
2 changes: 1 addition & 1 deletion NetworkPkg/Ip6Dxe/Ip6Dxe.inf
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
gEfiIp6ConfigProtocolGuid
gEfiDhcp6ServiceBindingProtocolGuid
gEfiDhcp6ProtocolGuid
gEfiIpSecProtocolGuid
gEfiIpSec2ProtocolGuid
gEfiHiiConfigAccessProtocolGuid

[Guids]
Expand Down
2 changes: 1 addition & 1 deletion NetworkPkg/Ip6Dxe/Ip6Input.c
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ Ip6IpSecProcessPacket (
ZeroMem (&ZeroHead, sizeof (EFI_IP6_HEADER));

if (mIpSec == NULL) {
gBS->LocateProtocol (&gEfiIpSecProtocolGuid, NULL, (VOID **) &mIpSec);
gBS->LocateProtocol (&gEfiIpSec2ProtocolGuid, NULL, (VOID **) &mIpSec);

//
// Check whether the ipsec protocol is available.
Expand Down
18 changes: 9 additions & 9 deletions NetworkPkg/IpSecDxe/IpSecDriver.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ IpSecDriverBindingStart (
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL
)
{
EFI_IPSEC_PROTOCOL *IpSec;
EFI_IPSEC2_PROTOCOL *IpSec;
EFI_STATUS Status;
EFI_STATUS Udp4Status;
EFI_STATUS Udp6Status;
Expand All @@ -103,7 +103,7 @@ IpSecDriverBindingStart (
//
// Ipsec protocol should be installed when load image.
//
Status = gBS->LocateProtocol (&gEfiIpSecProtocolGuid, NULL, (VOID **) &IpSec);
Status = gBS->LocateProtocol (&gEfiIpSec2ProtocolGuid, NULL, (VOID **) &IpSec);

if (EFI_ERROR (Status)) {
return Status;
Expand Down Expand Up @@ -171,7 +171,7 @@ IpSecDriverBindingStop (
IN EFI_HANDLE *ChildHandleBuffer
)
{
EFI_IPSEC_PROTOCOL *IpSec;
EFI_IPSEC2_PROTOCOL *IpSec;
EFI_STATUS Status;
IPSEC_PRIVATE_DATA *Private;
IKE_UDP_SERVICE *UdpSrv;
Expand All @@ -181,7 +181,7 @@ IpSecDriverBindingStop (
//
// Locate ipsec protocol to get private data.
//
Status = gBS->LocateProtocol (&gEfiIpSecProtocolGuid, NULL, (VOID **) &IpSec);
Status = gBS->LocateProtocol (&gEfiIpSec2ProtocolGuid, NULL, (VOID **) &IpSec);

if (EFI_ERROR (Status)) {
return Status;
Expand Down Expand Up @@ -301,12 +301,12 @@ IpSecDriverEntryPoint (
{
EFI_STATUS Status;
IPSEC_PRIVATE_DATA *Private;
EFI_IPSEC_PROTOCOL *IpSec;
EFI_IPSEC2_PROTOCOL *IpSec;

//
// Check whether ipsec protocol has already been installed.
//
Status = gBS->LocateProtocol (&gEfiIpSecProtocolGuid, NULL, (VOID **) &IpSec);
Status = gBS->LocateProtocol (&gEfiIpSec2ProtocolGuid, NULL, (VOID **) &IpSec);

if (!EFI_ERROR (Status)) {
DEBUG ((DEBUG_WARN, "_ModuleEntryPoint: IpSec has been already loaded\n"));
Expand Down Expand Up @@ -345,7 +345,7 @@ IpSecDriverEntryPoint (

Private->Signature = IPSEC_PRIVATE_DATA_SIGNATURE;
Private->ImageHandle = ImageHandle;
CopyMem (&Private->IpSec, &mIpSecInstance, sizeof (EFI_IPSEC_PROTOCOL));
CopyMem (&Private->IpSec, &mIpSecInstance, sizeof (EFI_IPSEC2_PROTOCOL));

//
// Initilize Private's members. Thess members is used for IKE.
Expand All @@ -371,7 +371,7 @@ IpSecDriverEntryPoint (
//
Status = gBS->InstallMultipleProtocolInterfaces (
&Private->Handle,
&gEfiIpSecProtocolGuid,
&gEfiIpSec2ProtocolGuid,
&Private->IpSec,
NULL
);
Expand All @@ -396,7 +396,7 @@ IpSecDriverEntryPoint (
ON_UNINSTALL_IPSEC:
gBS->UninstallProtocolInterface (
Private->Handle,
&gEfiIpSecProtocolGuid,
&gEfiIpSec2ProtocolGuid,
&Private->IpSec
);
ON_UNINSTALL_CONFIG:
Expand Down
2 changes: 1 addition & 1 deletion NetworkPkg/IpSecDxe/IpSecDxe.inf
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
gEfiUdp6ServiceBindingProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiUdp6ProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiIpSecConfigProtocolGuid # PROTOCOL ALWAYS_PRODUCED
gEfiIpSecProtocolGuid # PROTOCOL ALWAYS_PRODUCED
gEfiIpSec2ProtocolGuid # PROTOCOL ALWAYS_PRODUCED

[Pcd]
gEfiNetworkPkgTokenSpaceGuid.PcdIpsecCertificateEnabled
Expand Down
2 changes: 1 addition & 1 deletion NetworkPkg/IpSecDxe/IpSecImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ IpSecLookupSadBySpi (
The behavior is that it can perform one of the following actions:
bypass the packet, discard the packet, or protect the packet.
@param[in] This Pointer to the EFI_IPSEC_PROTOCOL instance.
@param[in] This Pointer to the EFI_IPSEC2_PROTOCOL instance.
@param[in] NicHandle Instance of the network interface.
@param[in] IpVersion IPV4 or IPV6.
@param[in, out] IpHead Pointer to the IP Header.
Expand Down
2 changes: 1 addition & 1 deletion NetworkPkg/IpSecDxe/IpSecMain.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ EFI_IPSEC2_PROTOCOL mIpSecInstance = { IpSecProcess, NULL, TRUE };
The behavior is that it can perform one of the following actions:
bypass the packet, discard the packet, or protect the packet.
@param[in] This Pointer to the EFI_IPSEC_PROTOCOL instance.
@param[in] This Pointer to the EFI_IPSEC2_PROTOCOL instance.
@param[in] NicHandle Instance of the network interface.
@param[in] IpVersion IPV4 or IPV6.
@param[in, out] IpHead Pointer to the IP Header.
Expand Down

0 comments on commit 0a7294f

Please sign in to comment.