Skip to content

Commit

Permalink
bgpd: Prevent possible SA thinking we'll divide by zero
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
donaldsharp committed Nov 22, 2019
1 parent 45559c4 commit 6d24b7c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bgpd/bgp_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 6d24b7c

Please sign in to comment.