]> git.puffer.fish Git - mirror/frr.git/commit
tools: Normalize prefix-lists and IP networks for avoiding unnecessary reload
authorDinesh G Dutt <ddutt@cumulusnetworks.com>
Sun, 8 Jan 2017 15:08:12 +0000 (07:08 -0800)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Mon, 30 Jan 2017 18:40:53 +0000 (13:40 -0500)
commitbb972e4465394f6ae319594b9b21c6f4726bf2e8
treeeff7b413a239c72588731db6221d4faca179dd62
parent3b69fd51184da846df41c40e8ebbbdc356f3aa8a
tools: Normalize prefix-lists and IP networks for avoiding unnecessary reload

Ticket: CM-14280, CM-14281, CM-14286
Reviewed By: CCR-5546
Testing Done: quagga_service_test, bgp_enhe, bgp_vrf etc.

If the user specifies a network statement such as "network 1.1.1.1/24",
the running config shows this as "network 1.1.1.0/24" which causes
unnecessary withdrawl of the prefix and re-advertisement causing
perturbations. The same thing applies to prefix-lists and of course, IPv6
addresses.

IPv6 addresses were being normalized already, and so we use that same
function to handle the IPv6 portion of the issue. Interestingly community
strings were also getting ensnared in the normalized IPv6 function due to
the presence of ':', but thats OK.

quagga's running config changes 'null0' and 'blackhole' keywords into 'Null0'.
For example: ip route 10.1.1.0/24 blackhole' is displayed as
'ip route 10.1.1.0/24 Null0'. Reload mistakes this and issues a delete of the
Null0 route followed by an add of the "blackhole" route. Unnecessary, and
results in unexpected routing perturabations.

Also fix prefix-list's le/ge behavior: It always prints ge first even if the
user has specified le followed by ge, and it doesn't print l3 32/128 if ge
is also specified, else it prints them.

Signed-off-by: Dinesh Dutt <ddutt@cumulusnetworks.com>
tools/frr-reload.py