From fd03dacd03c5af99652a209580de1651d9645fd4 Mon Sep 17 00:00:00 2001 From: Martin Buck Date: Fri, 19 Feb 2021 12:09:16 +0100 Subject: [PATCH] tests: Fix determination of IPv6 link-local addresses When parsing the output of "ip -6 address", allow arbitrary base interface names (the part after "@" in the interface name), not just "if0-9". Without this, link-local addresses sometimes are attributed to the wrong interface because we're not matching the interface name but still handle the interface's addresses. Signed-off-by: Martin Buck --- tests/topotests/lib/topotest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/topotests/lib/topotest.py b/tests/topotests/lib/topotest.py index 1e6ef1b2b3..7523bc70c6 100644 --- a/tests/topotests/lib/topotest.py +++ b/tests/topotests/lib/topotest.py @@ -1723,7 +1723,7 @@ class Router(Node): interface = "" ll_per_if_count = 0 for line in ifaces: - m = re.search("[0-9]+: ([^:@]+)[@if0-9:]+ <", line) + m = re.search("[0-9]+: ([^:@]+)[-@a-z0-9:]+ <", line) if m: interface = m.group(1) ll_per_if_count = 0 -- 2.39.5