From 8908161ff7d81df03485fd44130ff5ba0ad4d6ea Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Thu, 1 Aug 2019 18:39:19 +0200 Subject: [PATCH] ospfd: remove minor WTF in instance creation 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 --- ospfd/ospfd.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c index 5058886f36..c9285494ef 100644 --- a/ospfd/ospfd.c +++ b/ospfd/ospfd.c @@ -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); } -- 2.39.5