diff options
author | Jiaxin Wu <Jiaxin.wu@intel.com> | 2018-08-29 11:04:45 +0800 |
---|---|---|
committer | Jiaxin Wu <Jiaxin.wu@intel.com> | 2018-09-13 09:09:08 +0800 |
commit | ecbd055d4e8d83b71578e8ec5e32b09e4e9d3a81 (patch) | |
tree | 5a3301e16118e385e2b4b7871460ba55a3f9012c | |
parent | 4423f0bc613b5451feaa546c3f330ad625d65638 (diff) | |
download | edk2-ecbd055d4e8d83b71578e8ec5e32b09e4e9d3a81.tar.gz edk2-ecbd055d4e8d83b71578e8ec5e32b09e4e9d3a81.tar.bz2 edk2-ecbd055d4e8d83b71578e8ec5e32b09e4e9d3a81.zip |
MdeModulePkg/Ip4Dxe: Sync the direct route entry setting.
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>
-rw-r--r-- | MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c | 7 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c | 10 |
2 files changed, 7 insertions, 10 deletions
diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c index c19a72730e..b52542cd84 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c @@ -559,13 +559,6 @@ Ip4Config2SetDefaultAddr ( }
}
- Ip4AddRoute (
- IpSb->DefaultRouteTable,
- StationAddress,
- SubnetMask,
- IP4_ALLZERO_ADDRESS
- );
-
//
// Add a route for the connected network.
//
diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c index 87aadf13e4..b1af5294fb 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c @@ -672,10 +672,14 @@ Ip4ConfigProtocol ( }
//
- // Add a route to this connected network in the route table
+ // Add a route to this connected network in the instance route table.
//
- Ip4AddRoute (IpInstance->RouteTable, Ip, Netmask, IP4_ALLZERO_ADDRESS);
-
+ Ip4AddRoute (
+ IpInstance->RouteTable,
+ Ip & Netmask,
+ Netmask,
+ IP4_ALLZERO_ADDRESS
+ );
} else {
//
// Use the default address. Check the state.
|