summaryrefslogtreecommitdiffstats
path: root/lib/if_rmap.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@opensourcerouting.org>2019-04-19 21:54:29 +0200
committerRenato Westphal <renato@opensourcerouting.org>2019-04-19 21:54:29 +0200
commitcbcbac457870a9b569104b8250e57f0bd8d55114 (patch)
tree31e2bcf8bcf0bcb0808ce3449db99074125947cd /lib/if_rmap.c
parentripd, ripngd: fix cleaning up of offset lists (diff)
downloadfrr-cbcbac457870a9b569104b8250e57f0bd8d55114.tar.xz
frr-cbcbac457870a9b569104b8250e57f0bd8d55114.zip
ripd: unlink if-rmap container from global list before removing it
This solves a crash that happens if the "route-map" command is used after "router rip" + "no router rip" + "router rip". Once interface route-maps are converted to the new northbound model, we'll be able to remove the if_rmap_ctx_list global list (which is an ugly hack to make things work right now). Bug found by the CLI fuzzer. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'lib/if_rmap.c')
-rw-r--r--lib/if_rmap.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/if_rmap.c b/lib/if_rmap.c
index d8236b6b2..b0802da96 100644
--- a/lib/if_rmap.c
+++ b/lib/if_rmap.c
@@ -291,6 +291,7 @@ int config_write_if_rmap(struct vty *vty,
void if_rmap_ctx_delete(struct if_rmap_ctx *ctx)
{
+ listnode_delete(if_rmap_ctx_list, ctx);
hash_clean(ctx->ifrmaphash, (void (*)(void *))if_rmap_free);
if (ctx->name)
XFREE(MTYPE_IF_RMAP_CTX_NAME, ctx);