Skip to content

Commit

Permalink
ospfd: remove minor WTF in instance creation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
eqvinox committed Dec 6, 2019
1 parent 5d5393b commit 8908161
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions ospfd/ospfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 8908161

Please sign in to comment.