diff options
author | David Lamparter <equinox@diac24.net> | 2019-07-29 14:46:05 +0200 |
---|---|---|
committer | David Lamparter <equinox@diac24.net> | 2019-08-02 11:29:03 +0200 |
commit | d5eac1e0ca1d067af4e9e261711a37b2025ff612 (patch) | |
tree | a3bddf37bcd67d3a37b046bfa29b0bc3f5e4c3c2 /ospfd/ospf_vty.c | |
parent | ospfd: don't ASE with router-ID 0 (diff) | |
download | frr-d5eac1e0ca1d067af4e9e261711a37b2025ff612.tar.xz frr-d5eac1e0ca1d067af4e9e261711a37b2025ff612.zip |
ospfd: clean up default route logic
What a mess...
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'ospfd/ospf_vty.c')
-rw-r--r-- | ospfd/ospf_vty.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index 98ddd6a79..2564c6f33 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -8487,22 +8487,8 @@ DEFUN (no_ospf_default_information_originate, "Pointer to route-map entries\n") { VTY_DECLVAR_INSTANCE_CONTEXT(ospf, ospf); - struct prefix_ipv4 p; - struct ospf_external *ext; struct ospf_redist *red; - p.family = AF_INET; - p.prefix.s_addr = 0; - p.prefixlen = 0; - - ospf_external_lsa_flush(ospf, DEFAULT_ROUTE, &p, 0); - - ext = ospf_external_lookup(ospf, DEFAULT_ROUTE, 0); - if (ext && EXTERNAL_INFO(ext)) { - ospf_external_info_delete(ospf, DEFAULT_ROUTE, 0, p); - ospf_external_del(ospf, DEFAULT_ROUTE, 0); - } - red = ospf_redist_lookup(ospf, DEFAULT_ROUTE, 0); if (!red) return CMD_SUCCESS; @@ -8510,7 +8496,8 @@ DEFUN (no_ospf_default_information_originate, ospf_routemap_unset(red); ospf_redist_del(ospf, DEFAULT_ROUTE, 0); - return ospf_redistribute_default_unset(ospf); + return ospf_redistribute_default_set(ospf, DEFAULT_ORIGINATE_NONE, + 0, 0); } DEFUN (ospf_default_metric, |