Skip to content

Commit

Permalink
bgpd: release label to labelpool on dereg
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
pjdruddy committed Jan 4, 2021
1 parent 992dd67 commit 78b351d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bgpd/bgp_label.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 78b351d

Please sign in to comment.