mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-04-29 21:37:08 +00:00
tools: fix frr traceback on bgp neighbor bfd deletion
Problem reported that with certain configs, when the user deleted a "neighbor x.x.x.x bfd 4 100 100" statement from frr.conf and then reloaded, a traceback was seen and the deletion did not succeed. Found that in some scenarios it was possible to have something in lines_to_add that was in a different context and when the re.search was attempted, it found an empy line and was unhappy. This fix avoids trying to search in the wrong context. Ticket: CM-29145 Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
This commit is contained in:
parent
44fb33ee58
commit
ca7f04961d
@ -779,6 +779,7 @@ def ignore_delete_re_add_lines(lines_to_add, lines_to_del):
|
|||||||
bfd_search_string = bfd_nbr + r' bfd (\S+) (\S+) (\S+)'
|
bfd_search_string = bfd_nbr + r' bfd (\S+) (\S+) (\S+)'
|
||||||
|
|
||||||
for (ctx_keys, add_line) in lines_to_add:
|
for (ctx_keys, add_line) in lines_to_add:
|
||||||
|
if ctx_keys[0].startswith('router bgp'):
|
||||||
re_add_nbr_bfd_timers = re.search(bfd_search_string, add_line)
|
re_add_nbr_bfd_timers = re.search(bfd_search_string, add_line)
|
||||||
|
|
||||||
if re_add_nbr_bfd_timers:
|
if re_add_nbr_bfd_timers:
|
||||||
|
Loading…
Reference in New Issue
Block a user