modernize backfire 10.03 so it can be operational again
[openwrt-10.03/.git] / package / quagga / not-patches / patches-old / 110-bgpd_suppress_value_not_less_reuse_value.patch
1 From aa7dbb1067b7d02e1354fe1e5664ccb7d259d649 Mon Sep 17 00:00:00 2001
2 From: Balaji <balajig81@gmail.com>
3 Date: Mon, 16 Mar 2015 16:55:26 +0000
4 Subject: [PATCH] bgpd: Configured suppress value cannot be less than the reuse
5  value in bgp dampening
6
7 RFC 2439, Section 4.2; the values pair up for hysteresis.
8
9 Signed-off-by: Balaji.G <balajig81@gmail.com>
10 Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
11 ---
12  bgpd/bgp_route.c | 8 ++++++++
13  1 file changed, 8 insertions(+)
14
15 diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
16 index e7357e5..f84a72d 100644
17 --- a/bgpd/bgp_route.c
18 +++ b/bgpd/bgp_route.c
19 @@ -11976,6 +11976,14 @@ DEFUN (bgp_damp_set,
20      }
21  
22    bgp = vty->index;
23 +
24 +  if (suppress < reuse)
25 +    {
26 +      vty_out (vty, "Suppress value cannot be less than reuse value %s",
27 +                    VTY_NEWLINE);
28 +      return 0;
29 +    }
30 +
31    return bgp_damp_enable (bgp, bgp_node_afi (vty), bgp_node_safi (vty),
32                           half, reuse, suppress, max);
33  }
34 -- 
35 2.7.0
36