From deb2d4019e3cec05c7cef8f2c8611159b778e009 Mon Sep 17 00:00:00 2001 From: Don Slice Date: Tue, 19 Nov 2019 05:03:51 -0800 Subject: [PATCH] tools: resolve issue with bfd timer change fix in frr-reload.py Found that while the previous fix solved the traceback and created the correct configuration, it was doing a delete/add process rather than just an add. This was due to an incorrectly created search string. This commit fixes that search string and testing verifies that the correct thing is now being done. Ticket: CM-27233 Signed-off-by: Don Slice --- tools/frr-reload.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/frr-reload.py b/tools/frr-reload.py index f5784b7ecd..23869f374d 100755 --- a/tools/frr-reload.py +++ b/tools/frr-reload.py @@ -755,9 +755,10 @@ def ignore_delete_re_add_lines(lines_to_add, lines_to_del): if re_nbr_bfd_timers: nbr = re_nbr_bfd_timers.group(1) bfd_nbr = "neighbor %s" % nbr + bfd_search_string = bfd_nbr + r' bfd (\S+) (\S+) (\S+)' for (ctx_keys, add_line) in lines_to_add: - re_add_nbr_bfd_timers = re.search(r'neighbor bfd_nbr bfd (\S+) (\S+) (\S+)', add_line) + re_add_nbr_bfd_timers = re.search(bfd_search_string, add_line) if re_add_nbr_bfd_timers: found_add_bfd_nbr = line_exist(lines_to_add, ctx_keys, bfd_nbr, False) -- 2.39.5