]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/Ip4Dxe: Sync the direct route entry setting.
authorJiaxin Wu <Jiaxin.wu@intel.com>
Wed, 29 Aug 2018 03:04:45 +0000 (11:04 +0800)
committerJiaxin Wu <Jiaxin.wu@intel.com>
Thu, 13 Sep 2018 01:09:08 +0000 (09:09 +0800)
v2: use "IP & Netmask" directly instead of defining an additional variable.

This patch is to sync the direct route entry setting in both the default
and Instance route table {Subnet, Mask, NextHope} (
https://bugzilla.tianocore.org/show_bug.cgi?id=1143).

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c
MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c

index c19a72730e281592f3f85de0095043fa8d907d3f..b52542cd84ffec44f4994f6eb3a878bb956ce24a 100644 (file)
@@ -559,13 +559,6 @@ Ip4Config2SetDefaultAddr (
     }\r
   }\r
 \r
-  Ip4AddRoute (\r
-    IpSb->DefaultRouteTable,\r
-    StationAddress,\r
-    SubnetMask,\r
-    IP4_ALLZERO_ADDRESS\r
-    );\r
-\r
   //\r
   // Add a route for the connected network.\r
   //\r
index 87aadf13e4703fab2a320548d47aff0561dd0342..b1af5294fbc08d649231772f4069ed2a02bb68ea 100644 (file)
@@ -672,10 +672,14 @@ Ip4ConfigProtocol (
     }\r
 \r
     //\r
-    // Add a route to this connected network in the route table\r
+    // Add a route to this connected network in the instance route table.\r
     //\r
-    Ip4AddRoute (IpInstance->RouteTable, Ip, Netmask, IP4_ALLZERO_ADDRESS);\r
-\r
+    Ip4AddRoute (\r
+      IpInstance->RouteTable, \r
+      Ip & Netmask, \r
+      Netmask, \r
+      IP4_ALLZERO_ADDRESS\r
+      );\r
   } else {\r
     //\r
     // Use the default address. Check the state.\r