From: Martin Buck Date: Fri, 19 Feb 2021 11:09:16 +0000 (+0100) Subject: tests: Fix determination of IPv6 link-local addresses X-Git-Tag: base_8.0~304^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=fd03dacd03c5af99652a209580de1651d9645fd4;p=matthieu%2Ffrr.git 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 --- 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