]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospfd: remove minor WTF in instance creation
authorDavid Lamparter <equinox@diac24.net>
Thu, 1 Aug 2019 16:39:19 +0000 (18:39 +0200)
committerDavid Lamparter <equinox@diac24.net>
Fri, 6 Dec 2019 14:13:32 +0000 (15:13 +0100)
Well, "obviously" this condition block is pointless, since
ospf_router_id_update is called afterwards unconditionally...

(And even if it were needed, it would need to go in ospf_get too.)

Signed-off-by: David Lamparter <equinox@diac24.net>
ospfd/ospfd.c

index 5058886f362b32465cef555088932276e72d061b..c9285494ef72c22373f0c6c7a6be9aacd53f3793 100644 (file)
@@ -401,18 +401,8 @@ struct ospf *ospf_get_instance(unsigned short instance)
                ospf = ospf_new(instance, NULL /* VRF_DEFAULT*/);
                ospf_add(ospf);
 
-               if (ospf->router_id_static.s_addr == 0) {
-                       if (vrf_lookup_by_id(ospf->vrf_id))
-                               ospf_router_id_update(ospf);
-                       else {
-                               if (IS_DEBUG_OSPF_EVENT)
-                                       zlog_debug(
-                                               "%s: ospf VRF (id %d) is not active yet, skip router id update",
-                                               __PRETTY_FUNCTION__,
-                                               ospf->vrf_id);
-                       }
+               if (ospf->router_id_static.s_addr == 0)
                        ospf_router_id_update(ospf);
-               }
 
                ospf_opaque_type11_lsa_init(ospf);
        }