]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospfd: remove dead code
authorIgor Ryzhov <iryzhov@nfware.com>
Tue, 13 Oct 2020 21:02:48 +0000 (00:02 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Wed, 28 Oct 2020 18:35:49 +0000 (21:35 +0300)
ospf_router_id_update checks for ospf->oi_running, but it'll never be 1
right after creation by ospf_new.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
ospfd/ospfd.c

index 97edc2f3206c3f0e06782a2d26957bcb18fe2865..60eb4d0e24c7f756235027c9eb9bb95663dade95 100644 (file)
@@ -393,9 +393,6 @@ struct ospf *ospf_get(unsigned short instance, const char *name, bool *created)
                ospf = ospf_new(instance, name);
                ospf_add(ospf);
 
-               if (ospf->router_id_static.s_addr == INADDR_ANY)
-                       ospf_router_id_update(ospf);
-
                ospf_opaque_type11_lsa_init(ospf);
        }
 
@@ -412,9 +409,6 @@ struct ospf *ospf_get_instance(unsigned short instance, bool *created)
                ospf = ospf_new(instance, NULL /* VRF_DEFAULT*/);
                ospf_add(ospf);
 
-               if (ospf->router_id_static.s_addr == INADDR_ANY)
-                       ospf_router_id_update(ospf);
-
                ospf_opaque_type11_lsa_init(ospf);
        }