miniboot: fix incorrect vlan interface applied for default route

This commit fixes a but where the ip route add default is referencing
the management device name instead of the interface name (containing
vlan tag).

The issue is only seen when the OAM network is on a VLAN and
is a separate network (requires nexthop_gateway setting in
install values).

The fix is to apply the root on the vlan interface, not the top-level
network device interface.

Test Plan
PASS:
- Verify installation on system with OAM network on separate VLAN using
  nexthop_gateway
- Verify installation on system with vlan but no nexthop_gateway

Closes-Bug: 2013372
Change-Id: Ic3febbd0cb77dd21435f23859e6d228e6ab95a8c
Signed-off-by: Kyle MacLeod <kyle.macleod@windriver.com>
This commit is contained in:
Kyle MacLeod 2023-03-30 13:21:40 -04:00
parent 8003735fb3
commit 5bd181cdcf

View File

@ -1586,8 +1586,8 @@ else
ilog "Wait 10s to settle interface..."
sleep 10
ilog "ip ${BOOTPARAM_IP_VER} route add default ${BOOTPARAM_ROUTE_OPTIONS} dev ${mgmt_dev} ${BOOTPARAM_METRIC}"
ip ${BOOTPARAM_IP_VER} route add default ${BOOTPARAM_ROUTE_OPTIONS} dev ${mgmt_dev} ${BOOTPARAM_METRIC}
ilog "ip ${BOOTPARAM_IP_VER} route add default ${BOOTPARAM_ROUTE_OPTIONS} dev ${mgmt_iface} ${BOOTPARAM_METRIC}"
ip ${BOOTPARAM_IP_VER} route add default ${BOOTPARAM_ROUTE_OPTIONS} dev ${mgmt_iface} ${BOOTPARAM_METRIC}
ilog "ip ${BOOTPARAM_IP_VER} addr:"
ip ${BOOTPARAM_IP_VER} addr show
ilog "ip ${BOOTPARAM_IP_VER} route:"