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
diff --git a/package/quagga/not-patches/patches-old/110-bgpd_suppress_value_not_less_reuse_value.patch b/package/quagga/not-patches/patches-old/110-bgpd_suppress_value_not_less_reuse_value.patch
new file mode 100644 (file)
index 0000000..e549f61
--- /dev/null
@@ -0,0 +1,36 @@
+From aa7dbb1067b7d02e1354fe1e5664ccb7d259d649 Mon Sep 17 00:00:00 2001
+From: Balaji <balajig81@gmail.com>
+Date: Mon, 16 Mar 2015 16:55:26 +0000
+Subject: [PATCH] bgpd: Configured suppress value cannot be less than the reuse
+ value in bgp dampening
+
+RFC 2439, Section 4.2; the values pair up for hysteresis.
+
+Signed-off-by: Balaji.G <balajig81@gmail.com>
+Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
+---
+ bgpd/bgp_route.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
+index e7357e5..f84a72d 100644
+--- a/bgpd/bgp_route.c
++++ b/bgpd/bgp_route.c
+@@ -11976,6 +11976,14 @@ DEFUN (bgp_damp_set,
+     }
+   bgp = vty->index;
++
++  if (suppress < reuse)
++    {
++      vty_out (vty, "Suppress value cannot be less than reuse value %s",
++                    VTY_NEWLINE);
++      return 0;
++    }
++
+   return bgp_damp_enable (bgp, bgp_node_afi (vty), bgp_node_safi (vty),
+                         half, reuse, suppress, max);
+ }
+-- 
+2.7.0
+