ncsid: Use per-interface gateway
Change-Id: I97185fc181918ad4668cb4e758eec25c51090b04
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/subprojects/ncsid/src/ncsid_lib.sh b/subprojects/ncsid/src/ncsid_lib.sh
index a4899c7..86b5036 100644
--- a/subprojects/ncsid/src/ncsid_lib.sh
+++ b/subprojects/ncsid/src/ncsid_lib.sh
@@ -364,10 +364,11 @@
# set to the current value.
UpdateGateway() {
local service="$1"
- local ip="$2"
+ local netdev="$2"
+ local ip="$3"
- local object='/xyz/openbmc_project/network/config'
- local interface='xyz.openbmc_project.Network.SystemConfiguration'
+ local object="$(EthObjRoot "$netdev")"
+ local interface='xyz.openbmc_project.Network.EthernetInterface'
local property='DefaultGateway'
if ! IsIPv4 "$ip"; then
property='DefaultGateway6'