summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2025-01-29 17:06:27 +0200
committerGitHub <noreply@github.com>2025-01-29 17:06:27 +0200
commitc49bd1f9a5fdf80b24c25ca6eda83cc8a541a08c (patch)
treef64a8450040b07777e8f575284f47611e7f4dd9e
parent75991d68a1a7a1db51a14768c112a9b94d2f3d6f (diff)
parent06ce47558ffea3787b093cf7bbabf96d90063e9c (diff)
Merge pull request #17951 from FRRouting/mergify/bp/stable/10.0/pr-17946
tools: Fix frr-reload for ebgp-multihop TTL reconfiguration. (backport #17946)
-rwxr-xr-xtools/frr-reload.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/frr-reload.py b/tools/frr-reload.py
index e14f8613a8..b716d94066 100755
--- a/tools/frr-reload.py
+++ b/tools/frr-reload.py
@@ -237,6 +237,14 @@ def get_normalized_interface_vrf(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
# new multi-line context. All other commands are treated either as
# commands inside a multi-line context or as single-line contexts. This
@@ -319,6 +327,9 @@ class Config(object):
if ":" in 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:
#
# "ip route x.x.x.x/x y.y.y.y vrf <vrfname>"