summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_damp.h
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2019-11-10 19:13:20 +0100
committerDonatas Abraitis <donatas.abraitis@gmail.com>2019-11-11 08:52:40 +0100
commita935f597fcfa52bce4581439ae6b3399a86637db (patch)
tree16a75113883f4894b5c9e6dd4e0e89bac4e1561a /bgpd/bgp_damp.h
parentMerge pull request #5298 from donaldsharp/bgp_prefix_rpki (diff)
downloadfrr-a935f597fcfa52bce4581439ae6b3399a86637db.tar.xz
frr-a935f597fcfa52bce4581439ae6b3399a86637db.zip
bgpd: Rework BGP dampening to be per AFI/SAFI
Before we had: ! router bgp 65031 bgp dampening 1 2 3 4 ! exit2-debian-9(config)# router bgp 65031 exit2-debian-9(config-router)# address-family ipv4 multicast exit2-debian-9(config-router-af)# bgp dampening 5 6 7 8 exit2-debian-9(config-router-af)# end exit2-debian-9# show running-config ! router bgp 65031 bgp dampening 1 2 3 4 ! After fix: ! router bgp 65031 neighbor 192.168.1.2 remote-as 100 ! address-family ipv4 unicast bgp dampening 1 2 3 4 exit-address-family ! address-family ipv4 multicast bgp dampening 5 6 7 8 exit-address-family ! exit2-debian-9# show ip bgp ipv4 unicast dampening parameters Half-life time: 1 min Reuse penalty: 2 Suppress penalty: 3 Max suppress time: 4 min Max suppress penalty: 32 exit2-debian-9# show ip bgp ipv4 multicast dampening parameters Half-life time: 5 min Reuse penalty: 6 Suppress penalty: 7 Max suppress time: 8 min Max suppress penalty: 18 Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'bgpd/bgp_damp.h')
-rw-r--r--bgpd/bgp_damp.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/bgpd/bgp_damp.h b/bgpd/bgp_damp.h
index 18bf561c4..3dd860a29 100644
--- a/bgpd/bgp_damp.h
+++ b/bgpd/bgp_damp.h
@@ -106,6 +106,9 @@ struct bgp_damp_config {
/* Reuse timer thread per-set base. */
struct thread *t_reuse;
+
+ afi_t afi;
+ safi_t safi;
};
#define BGP_DAMP_NONE 0
@@ -134,17 +137,18 @@ extern int bgp_damp_withdraw(struct bgp_path_info *path, struct bgp_node *rn,
afi_t afi, safi_t safi, int attr_change);
extern int bgp_damp_update(struct bgp_path_info *path, struct bgp_node *rn,
afi_t afi, safi_t saff);
-extern int bgp_damp_scan(struct bgp_path_info *path, afi_t afi, safi_t safi);
-extern void bgp_damp_info_free(struct bgp_damp_info *path, int withdraw);
-extern void bgp_damp_info_clean(void);
-extern int bgp_damp_decay(time_t, int);
-extern void bgp_config_write_damp(struct vty *);
+extern void bgp_damp_info_free(struct bgp_damp_info *path, int withdraw,
+ afi_t afi, safi_t safi);
+extern void bgp_damp_info_clean(afi_t afi, safi_t safi);
+extern int bgp_damp_decay(time_t, int, struct bgp_damp_config *damp);
+extern void bgp_config_write_damp(struct vty *, afi_t afi, safi_t safi);
extern void bgp_damp_info_vty(struct vty *vty, struct bgp_path_info *path,
- json_object *json_path);
+ afi_t afi, safi_t safi, json_object *json_path);
extern const char *bgp_damp_reuse_time_vty(struct vty *vty,
struct bgp_path_info *path,
- char *timebuf, size_t len,
- bool use_json, json_object *json);
+ char *timebuf, size_t len, afi_t afi,
+ safi_t safi, bool use_json,
+ json_object *json);
extern int bgp_show_dampening_parameters(struct vty *vty, afi_t, safi_t);
#endif /* _QUAGGA_BGP_DAMP_H */