mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-04-30 08:44:14 +00:00
ospfd: Fix 4 levels of unnecessary indentation
Optimize display of code a tiny bit so that we can actually have readable code. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
d87d4e5e0f
commit
850dda33ce
@ -183,17 +183,22 @@ static void ospf_dr_change(struct ospf *ospf, struct route_table *nbrs)
|
|||||||
struct route_node *rn;
|
struct route_node *rn;
|
||||||
struct ospf_neighbor *nbr;
|
struct ospf_neighbor *nbr;
|
||||||
|
|
||||||
for (rn = route_top(nbrs); rn; rn = route_next(rn))
|
for (rn = route_top(nbrs); rn; rn = route_next(rn)) {
|
||||||
if ((nbr = rn->info) != NULL)
|
nbr = rn->info;
|
||||||
/* Ignore 0.0.0.0 node*/
|
|
||||||
if (nbr->router_id.s_addr != INADDR_ANY)
|
if (!nbr)
|
||||||
/* Is neighbor upper 2-Way? */
|
continue;
|
||||||
if (nbr->state >= NSM_TwoWay)
|
|
||||||
/* Ignore myself. */
|
/*
|
||||||
if (!IPV4_ADDR_SAME(&nbr->router_id,
|
* Ignore 0.0.0.0 node
|
||||||
&ospf->router_id))
|
* Is neighbor 2-Way?
|
||||||
OSPF_NSM_EVENT_SCHEDULE(
|
* Ignore myself
|
||||||
nbr, NSM_AdjOK);
|
*/
|
||||||
|
if (nbr->router_id.s_addr != INADDR_ANY
|
||||||
|
&& nbr->state >= NSM_TwoWay
|
||||||
|
&& !IPV4_ADDR_SAME(&nbr->router_id, &ospf->router_id))
|
||||||
|
OSPF_NSM_EVENT_SCHEDULE(nbr, NSM_AdjOK);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ospf_dr_election(struct ospf_interface *oi)
|
static int ospf_dr_election(struct ospf_interface *oi)
|
||||||
|
Loading…
Reference in New Issue
Block a user