mirror of
https://github.com/espressif/openthread.git
synced 2026-08-13 14:17:47 +00:00
[otci] fix parsing route flags (#8537)
A route in network data's output may have more than one flag. For example, a NAT64 route can have `sn` as its flags. The previous `__parse_routes` would crash when processing such a route.
This commit is contained in:
@@ -1622,9 +1622,9 @@ class OTCI(object):
|
||||
routes = []
|
||||
for line in output:
|
||||
line = line.split()
|
||||
if line[1] == 's':
|
||||
prefix, _, prf, rloc16 = line
|
||||
stable = True
|
||||
if len(line) == 4:
|
||||
prefix, flags, prf, rloc16 = line
|
||||
stable = 's' in flags
|
||||
else:
|
||||
prefix, prf, rloc16 = line
|
||||
stable = False
|
||||
|
||||
Reference in New Issue
Block a user