]> git.puffer.fish Git - matthieu/frr.git/commitdiff
tools: cleanup route convertion from null0/Null0 to blackhole
authoranlan_cs <anlan_cs@tom.com>
Fri, 31 Dec 2021 05:58:52 +0000 (00:58 -0500)
committeranlan_cs <anlan_cs@tom.com>
Fri, 31 Dec 2021 05:59:22 +0000 (00:59 -0500)
Signed-off-by: anlan_cs <anlan_cs@tom.com>
tools/frr-reload.py

index 7de87eb86932021d626657f4863017366f6c7497..acf816123551429504581e432b30af19c03a3e54 100755 (executable)
@@ -430,16 +430,12 @@ class Config(object):
         ):
             key[0] = re.sub(r"\s+null0(\s*$)", " Null0", key[0])
 
-        # Similar to above, but when the static is in a vrf, it turns into a
-        # blackhole nexthop for both null0 and Null0.  Fix it accordingly
         if lines and key[0].startswith("vrf "):
             newlines = []
             for line in lines:
                 if line.startswith("ip route ") or line.startswith("ipv6 route "):
                     if "null0" in line:
-                        line = re.sub(r"\s+null0(\s*$)", " blackhole", line)
-                    elif "Null0" in line:
-                        line = re.sub(r"\s+Null0(\s*$)", " blackhole", line)
+                        line = re.sub(r"\s+null0(\s*$)", " Null0", line)
                     newlines.append(line)
                 else:
                     newlines.append(line)