diff options
author | Reuben Dowle <reuben.dowle@4rf.com> | 2020-12-07 04:35:13 +0100 |
---|---|---|
committer | Reuben Dowle <reuben.dowle@4rf.com> | 2020-12-16 22:17:13 +0100 |
commit | ee72f0a0eb93038ef6dfd01fed9f32e24c5de2a1 (patch) | |
tree | 6d5313869a1bfa59546eec1470e7f3ab9ff12762 /nhrpd/nhrpd.h | |
parent | nhrpd: Only create one child sa (diff) | |
download | frr-ee72f0a0eb93038ef6dfd01fed9f32e24c5de2a1.tar.xz frr-ee72f0a0eb93038ef6dfd01fed9f32e24c5de2a1.zip |
nhrpd: Cleanup resources when interface is deleted
Currently when an interface is deleted from configuration, associated
resources are not freed. This causes memory leaks and crashes.
To reproduce this issue:
* Connect to a DMVPN hub
* Outside of frr, delete the underlying GRE interface
* Use 'no interface xxx' to delete the interface containing nhrp configurations
Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
Diffstat (limited to 'nhrpd/nhrpd.h')
-rwxr-xr-x[-rw-r--r--] | nhrpd/nhrpd.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/nhrpd/nhrpd.h b/nhrpd/nhrpd.h index 4ff9734ce..a36d0c445 100644..100755 --- a/nhrpd/nhrpd.h +++ b/nhrpd/nhrpd.h @@ -343,6 +343,7 @@ void nhrp_nhs_foreach(struct interface *ifp, afi_t afi, void (*cb)(struct nhrp_nhs *, struct nhrp_registration *, void *), void *ctx); +void nhrp_nhs_interface_del(struct interface *ifp); void nhrp_route_update_nhrp(const struct prefix *p, struct interface *ifp); void nhrp_route_announce(int add, enum nhrp_cache_type type, @@ -366,6 +367,7 @@ void nhrp_shortcut_foreach(afi_t afi, void nhrp_shortcut_purge(struct nhrp_shortcut *s, int force); void nhrp_shortcut_prefix_change(const struct prefix *p, int deleted); +void nhrp_cache_interface_del(struct interface *ifp); void nhrp_cache_config_free(struct nhrp_cache_config *c); struct nhrp_cache_config *nhrp_cache_config_get(struct interface *ifp, union sockunion *remote_addr, @@ -446,6 +448,7 @@ struct nhrp_reqid *nhrp_reqid_lookup(struct nhrp_reqid_pool *, uint32_t reqid); int nhrp_packet_init(void); +void nhrp_peer_interface_del(struct interface *ifp); struct nhrp_peer *nhrp_peer_get(struct interface *ifp, const union sockunion *remote_nbma); struct nhrp_peer *nhrp_peer_ref(struct nhrp_peer *p); |