diff options
author | Igor Ryzhov <iryzhov@nfware.com> | 2021-05-07 17:10:01 +0200 |
---|---|---|
committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-05-07 17:10:01 +0200 |
commit | ca187fd3558a9fafc0366eaf902aea60edd7ba91 (patch) | |
tree | 2462f0bf5c5c2add986acda20ccbe7eaaa622a63 /ospfd/ospfd.c | |
parent | ospfd: fix redistribution config when vrf doesn't exist (diff) | |
download | frr-ca187fd3558a9fafc0366eaf902aea60edd7ba91.tar.xz frr-ca187fd3558a9fafc0366eaf902aea60edd7ba91.zip |
ospfd: free "default-information originate" config when removing router
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'ospfd/ospfd.c')
-rw-r--r-- | ospfd/ospfd.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c index 8e047cd9c..2b9457d8b 100644 --- a/ospfd/ospfd.c +++ b/ospfd/ospfd.c @@ -697,6 +697,7 @@ static void ospf_finish_final(struct ospf *ospf) struct ospf_area *area; struct ospf_vl_data *vl_data; struct listnode *node, *nnode; + struct ospf_redist *red; int i; QOBJ_UNREG(ospf); @@ -710,7 +711,6 @@ static void ospf_finish_final(struct ospf *ospf) /* Unregister redistribution */ for (i = 0; i < ZEBRA_ROUTE_MAX; i++) { struct list *red_list; - struct ospf_redist *red; red_list = ospf->redist[i]; if (!red_list) @@ -721,7 +721,12 @@ static void ospf_finish_final(struct ospf *ospf) ospf_redist_del(ospf, i, red->instance); } } - ospf_redistribute_default_set(ospf, DEFAULT_ORIGINATE_NONE, 0, 0); + red = ospf_redist_lookup(ospf, DEFAULT_ROUTE, 0); + if (red) { + ospf_routemap_unset(red); + ospf_redist_del(ospf, DEFAULT_ROUTE, 0); + ospf_redistribute_default_set(ospf, DEFAULT_ORIGINATE_NONE, 0, 0); + } for (ALL_LIST_ELEMENTS(ospf->areas, node, nnode, area)) ospf_remove_vls_through_area(ospf, area); |