Skip to content

Commit

Permalink
MdeModulePkg/Ip4Dxe: Sync the direct route entry setting.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Fu Siyuan <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Wu Jiaxin <[email protected]>
Reviewed-by: Ye Ting <[email protected]>
Reviewed-by: Fu Siyuan <[email protected]>
  • Loading branch information
jiaxinwu committed Sep 13, 2018
1 parent 4423f0b commit ecbd055
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
7 changes: 0 additions & 7 deletions MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -559,13 +559,6 @@ Ip4Config2SetDefaultAddr (
}
}

Ip4AddRoute (
IpSb->DefaultRouteTable,
StationAddress,
SubnetMask,
IP4_ALLZERO_ADDRESS
);

//
// Add a route for the connected network.
//
Expand Down
10 changes: 7 additions & 3 deletions MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit ecbd055

Please sign in to comment.