summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_damp.h
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2021-07-29 00:17:50 +0200
committerIgor Ryzhov <iryzhov@nfware.com>2021-07-29 23:59:19 +0200
commit5054cfcbbc8c776a91e9390d36cff891d0890b4f (patch)
treeaa86645630e4fe5bc80b9c4fa584057dc0a79bf2 /bgpd/bgp_damp.h
parentMerge pull request #9216 from donaldsharp/simple_snmp_fix (diff)
downloadfrr-5054cfcbbc8c776a91e9390d36cff891d0890b4f.tar.xz
frr-5054cfcbbc8c776a91e9390d36cff891d0890b4f.zip
bgpd: fix incorrect usage of slist in dampening
Current code is a complete misuse of SLIST structure. Instead of just adding a SLIST_ENTRY to struct bgp_damp_info, it allocates a separate structure to be a node in the list. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'bgpd/bgp_damp.h')
-rw-r--r--bgpd/bgp_damp.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/bgpd/bgp_damp.h b/bgpd/bgp_damp.h
index 8367f291c..2e41d2fbd 100644
--- a/bgpd/bgp_damp.h
+++ b/bgpd/bgp_damp.h
@@ -61,14 +61,11 @@ struct bgp_damp_info {
afi_t afi;
safi_t safi;
-};
-struct reuselist_node {
- SLIST_ENTRY(reuselist_node) entry;
- struct bgp_damp_info *info;
+ SLIST_ENTRY(bgp_damp_info) entry;
};
-SLIST_HEAD(reuselist, reuselist_node);
+SLIST_HEAD(reuselist, bgp_damp_info);
/* Specified parameter set configuration. */
struct bgp_damp_config {