diff options
author | Philippe Guibert <philippe.guibert@6wind.com> | 2018-04-24 16:35:00 +0200 |
---|---|---|
committer | Philippe Guibert <philippe.guibert@6wind.com> | 2018-04-30 11:56:23 +0200 |
commit | a6b07429a4b0e4959a33ad2e17de6da5017dc438 (patch) | |
tree | 70a8594fceee2f629436c30ccb042df91c9fc400 /bgpd/bgp_pbr.h | |
parent | bgpd: rewiew bgp pbr log messages with debug bgp pbr (diff) | |
download | frr-a6b07429a4b0e4959a33ad2e17de6da5017dc438.tar.xz frr-a6b07429a4b0e4959a33ad2e17de6da5017dc438.zip |
bgpd: handle bgp pbr hash list destroy upon BGP destroy
Upon BGP destroy, the hash list related to PBR are removed.
The pbr_match entries, as well as the contained pbr_match_entries
entries.
Then the pbr_action entries. The order is important, since the former
are referencing pbr_action. So the references must be removed, prior to
remove pbr action.
Also, the zebra associated contexts are removed.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'bgpd/bgp_pbr.h')
-rw-r--r-- | bgpd/bgp_pbr.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bgpd/bgp_pbr.h b/bgpd/bgp_pbr.h index d82f125ec..5129ada37 100644 --- a/bgpd/bgp_pbr.h +++ b/bgpd/bgp_pbr.h @@ -215,7 +215,8 @@ struct bgp_pbr_action { bool installed; bool install_in_progress; - + uint32_t refcnt; + struct bgp *bgp; }; extern struct bgp_pbr_action *bgp_pbr_action_rule_lookup(vrf_id_t vrf_id, @@ -230,6 +231,7 @@ extern struct bgp_pbr_match_entry *bgp_pbr_match_ipset_entry_lookup( extern struct bgp_pbr_match *bgp_pbr_match_iptable_lookup(vrf_id_t vrf_id, uint32_t unique); +extern void bgp_pbr_cleanup(struct bgp *bgp); extern void bgp_pbr_init(struct bgp *bgp); extern uint32_t bgp_pbr_action_hash_key(void *arg); |