]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Output.c
MdeModulePkg: Update Ip4Dxe driver to support Ip4Config2 protocol,
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Ip4Dxe / Ip4Output.c
index 370eaa6a9f7a315928e894d23ff18c7258c1ecd2..68d1f0943ff504080d74eacc317d3554ceac102c 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Transmit the IP4 packet.\r
   \r
-Copyright (c) 2005 - 2013, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -312,6 +312,13 @@ Ip4Output (
       CacheEntry = Ip4Route (IpSb->DefaultRouteTable, Head->Dst, Head->Src);\r
     } else {\r
       CacheEntry = Ip4Route (IpInstance->RouteTable, Head->Dst, Head->Src);\r
+      //\r
+      // If failed to route the packet by using the instance's route table,\r
+      // try to use the default route table.\r
+      //\r
+      if (CacheEntry == NULL) {\r
+        CacheEntry = Ip4Route (IpSb->DefaultRouteTable, Head->Dst, Head->Src);\r
+      }\r
     }\r
 \r
     if (CacheEntry == NULL) {\r