mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-27 13:06:51 +00:00
Merge pull request #3418 from pguibert6WIND/bgp_rfapi_path_info_extra_free
bgpd: reuse bgp_path_info_extra_free() routing in rfapi
This commit is contained in:
commit
60e2b4f566
@ -176,7 +176,7 @@ static struct bgp_path_info_extra *bgp_path_info_extra_new(void)
|
|||||||
return new;
|
return new;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void bgp_path_info_extra_free(struct bgp_path_info_extra **extra)
|
void bgp_path_info_extra_free(struct bgp_path_info_extra **extra)
|
||||||
{
|
{
|
||||||
struct bgp_path_info_extra *e;
|
struct bgp_path_info_extra *e;
|
||||||
|
|
||||||
|
@ -362,6 +362,7 @@ extern struct bgp_node *bgp_afi_node_get(struct bgp_table *table, afi_t afi,
|
|||||||
extern struct bgp_path_info *bgp_path_info_lock(struct bgp_path_info *path);
|
extern struct bgp_path_info *bgp_path_info_lock(struct bgp_path_info *path);
|
||||||
extern struct bgp_path_info *bgp_path_info_unlock(struct bgp_path_info *path);
|
extern struct bgp_path_info *bgp_path_info_unlock(struct bgp_path_info *path);
|
||||||
extern void bgp_path_info_add(struct bgp_node *rn, struct bgp_path_info *pi);
|
extern void bgp_path_info_add(struct bgp_node *rn, struct bgp_path_info *pi);
|
||||||
|
extern void bgp_path_info_extra_free(struct bgp_path_info_extra **extra);
|
||||||
extern void bgp_path_info_reap(struct bgp_node *rn, struct bgp_path_info *pi);
|
extern void bgp_path_info_reap(struct bgp_node *rn, struct bgp_path_info *pi);
|
||||||
extern void bgp_path_info_delete(struct bgp_node *rn, struct bgp_path_info *pi);
|
extern void bgp_path_info_delete(struct bgp_node *rn, struct bgp_path_info *pi);
|
||||||
extern struct bgp_path_info_extra *
|
extern struct bgp_path_info_extra *
|
||||||
|
@ -550,11 +550,8 @@ static void rfapiBgpInfoFree(struct bgp_path_info *goner)
|
|||||||
if (goner->attr) {
|
if (goner->attr) {
|
||||||
bgp_attr_unintern(&goner->attr);
|
bgp_attr_unintern(&goner->attr);
|
||||||
}
|
}
|
||||||
if (goner->extra) {
|
if (goner->extra)
|
||||||
assert(!goner->extra->damp_info); /* Not used in import tbls */
|
bgp_path_info_extra_free(&goner->extra);
|
||||||
XFREE(MTYPE_BGP_ROUTE_EXTRA, goner->extra);
|
|
||||||
goner->extra = NULL;
|
|
||||||
}
|
|
||||||
XFREE(MTYPE_BGP_ROUTE, goner);
|
XFREE(MTYPE_BGP_ROUTE, goner);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user