diff options
author | David Lamparter <equinox@diac24.net> | 2019-07-29 12:43:46 +0200 |
---|---|---|
committer | David Lamparter <equinox@diac24.net> | 2019-08-02 11:29:03 +0200 |
commit | bcbe98cca0b52ffd43d2bf49651ea5698390b691 (patch) | |
tree | 41368e9ad9596eb82c8e2be88e7fde5b8ad50336 /ospfd/ospf_zebra.c | |
parent | ospfd: remove LSA reorigin on NSM change (diff) | |
download | frr-bcbe98cca0b52ffd43d2bf49651ea5698390b691.tar.xz frr-bcbe98cca0b52ffd43d2bf49651ea5698390b691.zip |
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>
Diffstat (limited to 'ospfd/ospf_zebra.c')
-rw-r--r-- | ospfd/ospf_zebra.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c index 714b3bb81..0519092e4 100644 --- a/ospfd/ospf_zebra.c +++ b/ospfd/ospf_zebra.c @@ -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; |