bgpd: Reuse bgp_path_info_extra_get() for allocating new bgp path info

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
This commit is contained in:
Donatas Abraitis 2022-01-28 21:11:12 +02:00
parent a9155261f7
commit 53d3a0a80d

View File

@ -6214,7 +6214,7 @@ static void bgp_static_update_safi(struct bgp *bgp, const struct prefix *p,
new = info_make(ZEBRA_ROUTE_BGP, BGP_ROUTE_STATIC, 0, bgp->peer_self,
attr_new, dest);
SET_FLAG(new->flags, BGP_PATH_VALID);
new->extra = bgp_path_info_extra_new();
bgp_path_info_extra_get(new);
if (num_labels) {
new->extra->label[0] = bgp_static->label;
new->extra->num_labels = num_labels;