From: David Lamparter Date: Thu, 1 Aug 2019 16:39:19 +0000 (+0200) Subject: ospfd: remove minor WTF in instance creation X-Git-Tag: base_7.3~99^2~3 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=8908161ff7d81df03485fd44130ff5ba0ad4d6ea;p=mirror%2Ffrr.git 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 --- 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); }