[CI FIX] Fix 'ip route' matching multiple subnets
Existing 'ip route list proto kernel match <subnet>' may match subnets different than the one specified when specific CI nodes are selected to run CI job. This patch changes the command to prevent unrelated subnets from being listed. Change-Id: I62da6f14eb53c6d3c74442a626b7ea0fd37a7cad Closes-bug: #1617417
This commit is contained in:
parent
614418a2e4
commit
bfff3a7b8d
|
@ -349,8 +349,8 @@ class IpRouteCommand(IpDeviceCommandBase):
|
|||
subnet = device_route_line.split()[0]
|
||||
except Exception:
|
||||
continue
|
||||
subnet_route_list_lines = self._run('list', 'proto', 'kernel',
|
||||
'match', subnet).split('\n')
|
||||
subnet_route_list_lines = self._run(
|
||||
'list', 'proto', 'kernel', 'exact', subnet).split('\n')
|
||||
for subnet_route_line in subnet_route_list_lines:
|
||||
i = iter(subnet_route_line.split())
|
||||
while(next(i) != 'dev'):
|
||||
|
|
Loading…
Reference in New Issue