diff options
| author | Pat Ruddy <pat@voltanet.io> | 2020-12-17 10:49:30 +0000 |
|---|---|---|
| committer | Pat Ruddy <pat@voltanet.io> | 2021-01-04 14:29:44 +0000 |
| commit | 78b351ddcd96640e5a0aeb4c8e3baf65a0e67fc2 (patch) | |
| tree | ecb52d29e637f09d7315020eec1cd085fb9e9c62 | |
| parent | 992dd67ec76de375b967b408c26f9c9f9e0608c5 (diff) | |
bgpd: release label to labelpool on dereg
when we de-register for a label associated with a prefix then release
it back to the labelpool to clean up the stale reference held in the
ledger and inuse lists.
Signed-off-by: Pat Ruddy <pat@voltanet.io>
| -rw-r--r-- | bgpd/bgp_label.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bgpd/bgp_label.c b/bgpd/bgp_label.c index 4d39b88839..5a31bd0243 100644 --- a/bgpd/bgp_label.c +++ b/bgpd/bgp_label.c @@ -277,8 +277,11 @@ void bgp_reg_dereg_for_label(struct bgp_dest *dest, struct bgp_path_info *pi, return; } } - } else + } else { UNSET_FLAG(dest->flags, BGP_NODE_LABEL_REQUESTED); + bgp_lp_release(LP_TYPE_BGP_LU, dest, + label_pton(&dest->local_label)); + } bgp_send_fec_register_label_msg( dest, reg, with_label_index ? pi->attr->label_index : 0); |
