mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 17:18:56 +00:00
zebra: Free up routemap name memory on vrf deletion event
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
b3faf1aab6
commit
cda0f501fb
@ -1818,6 +1818,23 @@ static void zebra_route_map_event(const char *rmap_name)
|
|||||||
route_map_notify_dependencies(rmap_name, RMAP_EVENT_MATCH_ADDED);
|
route_map_notify_dependencies(rmap_name, RMAP_EVENT_MATCH_ADDED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void zebra_routemap_vrf_delete(struct zebra_vrf *zvrf)
|
||||||
|
{
|
||||||
|
afi_t afi;
|
||||||
|
uint8_t type;
|
||||||
|
|
||||||
|
for (afi = AFI_IP; afi < AFI_MAX; afi++) {
|
||||||
|
for (type = 0; type <= ZEBRA_ROUTE_MAX; type++) {
|
||||||
|
if (PROTO_RM_NAME(zvrf, afi, type))
|
||||||
|
XFREE(MTYPE_ROUTE_MAP_NAME,
|
||||||
|
PROTO_RM_NAME(zvrf, afi, type));
|
||||||
|
if (NHT_RM_NAME(zvrf, afi, type))
|
||||||
|
XFREE(MTYPE_ROUTE_MAP_NAME,
|
||||||
|
NHT_RM_NAME(zvrf, afi, type));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* ip protocol configuration write function */
|
/* ip protocol configuration write function */
|
||||||
void zebra_routemap_config_write_protocol(struct vty *vty,
|
void zebra_routemap_config_write_protocol(struct vty *vty,
|
||||||
struct zebra_vrf *zvrf)
|
struct zebra_vrf *zvrf)
|
||||||
|
@ -50,6 +50,8 @@ zebra_nht_route_map_check(afi_t afi, int client_proto, const struct prefix *p,
|
|||||||
struct zebra_vrf *zvrf, struct route_entry *,
|
struct zebra_vrf *zvrf, struct route_entry *,
|
||||||
struct nexthop *nexthop);
|
struct nexthop *nexthop);
|
||||||
|
|
||||||
|
extern void zebra_routemap_vrf_delete(struct zebra_vrf *zvrf);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -268,6 +268,7 @@ static int zebra_vrf_delete(struct vrf *vrf)
|
|||||||
|
|
||||||
/* Cleanup EVPN states for vrf */
|
/* Cleanup EVPN states for vrf */
|
||||||
zebra_vxlan_vrf_delete(zvrf);
|
zebra_vxlan_vrf_delete(zvrf);
|
||||||
|
zebra_routemap_vrf_delete(zvrf);
|
||||||
|
|
||||||
list_delete_all_node(zvrf->rid_all_sorted_list);
|
list_delete_all_node(zvrf->rid_all_sorted_list);
|
||||||
list_delete_all_node(zvrf->rid_lo_sorted_list);
|
list_delete_all_node(zvrf->rid_lo_sorted_list);
|
||||||
|
Loading…
Reference in New Issue
Block a user