Merge pull request #17951 from FRRouting/mergify/bp/stable/10.0/pr-17946

tools: Fix frr-reload for ebgp-multihop TTL reconfiguration. (backport #17946)
This commit is contained in:
Donatas Abraitis 2025-01-29 17:06:27 +02:00 committed by GitHub
commit c49bd1f9a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -237,6 +237,14 @@ def get_normalized_interface_vrf(line):
return line return line
def get_normalized_ebgp_multihop_line(line):
obj = re.search(r"(.*)ebgp-multihop\s+255", line)
if obj:
line = obj.group(1) + "ebgp-multihop"
return line
# This dictionary contains a tree of all commands that we know start a # This dictionary contains a tree of all commands that we know start a
# new multi-line context. All other commands are treated either as # new multi-line context. All other commands are treated either as
# commands inside a multi-line context or as single-line contexts. This # commands inside a multi-line context or as single-line contexts. This
@ -319,6 +327,9 @@ class Config(object):
if ":" in line: if ":" in line:
line = get_normalized_mac_ip_line(line) line = get_normalized_mac_ip_line(line)
if "ebgp-multihop" in line:
line = get_normalized_ebgp_multihop_line(line)
# vrf static routes can be added in two ways. The old way is: # vrf static routes can be added in two ways. The old way is:
# #
# "ip route x.x.x.x/x y.y.y.y vrf <vrfname>" # "ip route x.x.x.x/x y.y.y.y vrf <vrfname>"