]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/IpSecDxe/IpSecMain.c
NetworkPkg: Clean up source files
[mirror_edk2.git] / NetworkPkg / IpSecDxe / IpSecMain.c
index a2fefa70d7127b009ec5f6e11fbb0ba642dd9eb9..a193dd5a000bdf1ab2a24bf5dbe5adaa115bb05a 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The mian interface of IPsec Protocol.\r
 \r
-  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -70,9 +70,9 @@ IpSecProcess (
   UINT8                  OldLastHead;\r
   BOOLEAN                IsOutbound;\r
 \r
-  if (OptionsBuffer == NULL || \r
-      OptionsLength == NULL || \r
-      FragmentTable == NULL || \r
+  if (OptionsBuffer == NULL ||\r
+      OptionsLength == NULL ||\r
+      FragmentTable == NULL ||\r
       FragmentCount == NULL\r
       ) {\r
     return EFI_INVALID_PARAMETER;\r
@@ -83,7 +83,7 @@ IpSecProcess (
   OldLastHead     = *LastHead;\r
   *RecycleSignal  = NULL;\r
   SpdList         = &mConfigData[IPsecConfigDataTypeSpd];\r
-  \r
+\r
   if (!IsOutbound) {\r
     //\r
     // For inbound traffic, process the ipsec header of the packet.\r
@@ -108,7 +108,7 @@ IpSecProcess (
     }\r
 \r
     if (Status == EFI_SUCCESS) {\r
-      \r
+\r
       //\r
       // Check the spd entry if the packet is accessible.\r
       //\r
@@ -120,18 +120,18 @@ IpSecProcess (
       Status =  EFI_ACCESS_DENIED;\r
       NET_LIST_FOR_EACH (Entry, SpdList) {\r
         SpdEntry = IPSEC_SPD_ENTRY_FROM_LIST (Entry);\r
-        if (IsSubSpdSelector (               \r
+        if (IsSubSpdSelector (\r
               (EFI_IPSEC_CONFIG_SELECTOR *) SpdSelector,\r
               (EFI_IPSEC_CONFIG_SELECTOR *) SpdEntry->Selector\r
               )) {\r
           Status = EFI_SUCCESS;\r
         }\r
-      }      \r
+      }\r
       goto ON_EXIT;\r
-    }       \r
+    }\r
   }\r
 \r
-  Status  = EFI_ACCESS_DENIED;  \r
+  Status  = EFI_ACCESS_DENIED;\r
 \r
   NET_LIST_FOR_EACH (Entry, SpdList) {\r
     //\r
@@ -145,7 +145,7 @@ IpSecProcess (
                      IpHead,\r
                      IpPayload,\r
                      OldLastHead,\r
-                     IsOutbound, \r
+                     IsOutbound,\r
                      &Action\r
                      ))) {\r
       //\r
@@ -222,20 +222,20 @@ IpSecProcess (
       goto ON_EXIT;\r
 \r
     case EfiIPsecActionDiscard:\r
-      goto ON_EXIT;   \r
+      goto ON_EXIT;\r
     }\r
   }\r
-   \r
+\r
   //\r
   // If don't find the related SPD entry, return the EFI_ACCESS_DENIED and discard it.\r
   // But it the packet is NS/NA, it should be by passed even not find the related SPD entry.\r
   //\r
-  if (OldLastHead == IP6_ICMP && \r
+  if (OldLastHead == IP6_ICMP &&\r
       (*IpPayload == ICMP_V6_NEIGHBOR_SOLICIT || *IpPayload == ICMP_V6_NEIGHBOR_ADVERTISE)\r
       ){\r
     Status = EFI_SUCCESS;\r
   }\r
-  \r
+\r
 ON_EXIT:\r
   return Status;\r
 }\r