bgpd: Prevent possible SA thinking we'll divide by zero

The half and reuse variables can never be 1 but the
SA systems we have do not know this and think it is possible.
Provide the kick in the snarples that the SA needs to know
this is not true.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2019-11-21 19:41:48 -05:00
parent 45559c4dfe
commit 6d24b7cc08

View File

@ -12183,6 +12183,12 @@ DEFUN (bgp_damp_set,
max = 4 * half;
}
/*
* These can't be 0 but our SA doesn't understand the
* way our cli is constructed
*/
assert(reuse);
assert(half);
if (suppress < reuse) {
vty_out(vty,
"Suppress value cannot be less than reuse value \n");