ospfd: unset default route external_info

Need to clear out the external_info for the "always" default route that
we installed in ospf_redistribute_default_set().

Signed-off-by: David Lamparter <equinox@diac24.net>
This commit is contained in:
David Lamparter 2019-07-29 12:43:46 +02:00
parent ba50df2b53
commit bcbe98cca0

View File

@ -845,6 +845,14 @@ int ospf_redistribute_default_unset(struct ospf *ospf)
return CMD_SUCCESS;
zclient_redistribute_default(ZEBRA_REDISTRIBUTE_DEFAULT_DELETE,
zclient, AFI_IP, ospf->vrf_id);
} else if (ospf->default_originate == DEFAULT_ORIGINATE_ALWAYS) {
struct prefix_ipv4 p;
p.family = AF_INET;
p.prefix.s_addr = 0;
p.prefixlen = 0;
ospf_external_info_delete(ospf, DEFAULT_ROUTE, 0, &p);
}
ospf->default_originate = DEFAULT_ORIGINATE_NONE;
@ -852,8 +860,6 @@ int ospf_redistribute_default_unset(struct ospf *ospf)
if (IS_DEBUG_OSPF(zebra, ZEBRA_REDISTRIBUTE))
zlog_debug("Redistribute[DEFAULT]: Stop");
// Pending: how does the external_info cleanup work in this case?
ospf_asbr_status_update(ospf, --ospf->redistribute);
return CMD_SUCCESS;