diff options
| author | Don Slice <dslice@cumulusnetworks.com> | 2019-01-25 13:37:03 -0500 |
|---|---|---|
| committer | Don Slice <dslice@cumulusnetworks.com> | 2019-02-26 14:08:27 +0000 |
| commit | 348135a5da8dc9f2c140fbd4131d05f97e4625c6 (patch) | |
| tree | c95178507d2272ad7d694ec334525232447898fd /tools/frr-reload.py | |
| parent | 4923d6ed9822deae74aa71775337a8f1b51da3ec (diff) | |
tools: fix blackhole static changes in frr-reload.py
Problem caused when nclu is used to create "ip route 1.1.1.0/24
blackhole" because frr-reload.py changed the line to Null0 instead
of blackhole. If nclu tries to delete it using the same line as
entered, the commit fails since it doesn't match.
Ticket: CM-23986
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
Diffstat (limited to 'tools/frr-reload.py')
| -rwxr-xr-x | tools/frr-reload.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/frr-reload.py b/tools/frr-reload.py index c48c8b97ad..298cae7a32 100755 --- a/tools/frr-reload.py +++ b/tools/frr-reload.py @@ -300,13 +300,11 @@ class Config(object): ''' More fixups in user specification and what running config shows. - "null0" in routes must be replaced by Null0, and "blackhole" must - be replaced by Null0 as well. + "null0" in routes must be replaced by Null0. ''' if (key[0].startswith('ip route') or key[0].startswith('ipv6 route') and - 'null0' in key[0] or 'blackhole' in key[0]): + 'null0' in key[0]): key[0] = re.sub(r'\s+null0(\s*$)', ' Null0', key[0]) - key[0] = re.sub(r'\s+blackhole(\s*$)', ' Null0', key[0]) if lines: if tuple(key) not in self.contexts: |
