summaryrefslogtreecommitdiff
path: root/bgpd/bgp_damp.h
diff options
context:
space:
mode:
authorIgor Ryzhov <iryzhov@nfware.com>2021-07-29 01:17:50 +0300
committerDonatas Abraitis <donatas@opensourcerouting.org>2024-05-03 09:30:32 +0300
commit1d37871588b82ae17ee4c512c293ac87904883d6 (patch)
treec5afa86cab2b363c69a1f8e6d3b8af9b1c0375e8 /bgpd/bgp_damp.h
parent4c500d6952ea597eb7422358e18788547eed92a6 (diff)
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 22b2efebbc..ce3cb87837 100644
--- a/bgpd/bgp_damp.h
+++ b/bgpd/bgp_damp.h
@@ -46,14 +46,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 {