forked from Mirror/frr
2003-06-19 Paul Jakma <paul@dishone.st>
* ospfd/ospf_zebra.c: Run it through indent -nut to fix the $%^@ing annoying mix of tabs and spaces.
This commit is contained in:
parent
72357f2b98
commit
cf795c5ded
|
@ -67,7 +67,7 @@ ospf_interface_add (int command, struct zclient *zclient, zebra_size_t length)
|
|||
zlog_info ("Zebra: interface add %s index %d flags %ld metric %d mtu %d",
|
||||
ifp->name, ifp->ifindex, ifp->flags, ifp->metric, ifp->mtu);
|
||||
|
||||
assert(ifp->info);
|
||||
assert (ifp->info);
|
||||
|
||||
if (!OSPF_IF_PARAM_CONFIGURED (IF_DEF_PARAMS (ifp), type))
|
||||
{
|
||||
|
@ -113,7 +113,8 @@ ospf_interface_delete (int command, struct zclient *zclient,
|
|||
ifp->name);
|
||||
|
||||
if (IS_DEBUG_OSPF (zebra, ZEBRA_INTERFACE))
|
||||
zlog_info ("Zebra: interface delete %s index %d flags %ld metric %d mtu %d",
|
||||
zlog_info
|
||||
("Zebra: interface delete %s index %d flags %ld metric %d mtu %d",
|
||||
ifp->name, ifp->ifindex, ifp->flags, ifp->metric, ifp->mtu);
|
||||
|
||||
#ifdef HAVE_SNMP
|
||||
|
@ -207,9 +208,9 @@ ospf_interface_state_up (int command, struct zclient *zclient,
|
|||
if (IS_DEBUG_OSPF (zebra, ZEBRA_INTERFACE))
|
||||
zlog_info ("Zebra: Interface[%s] state change to up.", ifp->name);
|
||||
|
||||
for (rn = route_top (IF_OIFS (ifp));rn; rn = route_next (rn))
|
||||
for (rn = route_top (IF_OIFS (ifp)); rn; rn = route_next (rn))
|
||||
{
|
||||
if ( (oi = rn->info) == NULL)
|
||||
if ((oi = rn->info) == NULL)
|
||||
continue;
|
||||
|
||||
ospf_if_up (oi);
|
||||
|
@ -234,9 +235,9 @@ ospf_interface_state_down (int command, struct zclient *zclient,
|
|||
if (IS_DEBUG_OSPF (zebra, ZEBRA_INTERFACE))
|
||||
zlog_info ("Zebra: Interface[%s] state change to down.", ifp->name);
|
||||
|
||||
for (node = route_top (IF_OIFS (ifp));node; node = route_next (node))
|
||||
for (node = route_top (IF_OIFS (ifp)); node; node = route_next (node))
|
||||
{
|
||||
if ( (oi = node->info) == NULL)
|
||||
if ((oi = node->info) == NULL)
|
||||
continue;
|
||||
ospf_if_down (oi);
|
||||
}
|
||||
|
@ -288,7 +289,7 @@ ospf_interface_address_delete (int command, struct zclient *zclient,
|
|||
p.prefixlen = IPV4_MAX_PREFIXLEN;
|
||||
|
||||
rn = route_node_lookup (IF_OIFS (ifp), &p);
|
||||
if (! rn)
|
||||
if (!rn)
|
||||
return 0;
|
||||
|
||||
assert (rn->info);
|
||||
|
@ -351,7 +352,7 @@ ospf_zebra_add (struct prefix_ipv4 *p, struct ospf_route *or)
|
|||
/* Put prefix information. */
|
||||
psize = PSIZE (p->prefixlen);
|
||||
stream_putc (s, p->prefixlen);
|
||||
stream_write (s, (u_char *)&p->prefix, psize);
|
||||
stream_write (s, (u_char *) & p->prefix, psize);
|
||||
|
||||
/* Nexthop count. */
|
||||
stream_putc (s, or->path->count);
|
||||
|
@ -379,8 +380,7 @@ ospf_zebra_add (struct prefix_ipv4 *p, struct ospf_route *or)
|
|||
{
|
||||
zlog_info ("Zebra: Route add %s/%d nexthop %s",
|
||||
inet_ntoa (p->prefix),
|
||||
p->prefixlen,
|
||||
inet_ntoa (path->nexthop));
|
||||
p->prefixlen, inet_ntoa (path->nexthop));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -441,8 +441,7 @@ ospf_zebra_delete (struct prefix_ipv4 *p, struct ospf_route *or)
|
|||
{
|
||||
zlog_info ("Zebra: Route delete %s/%d nexthop %s",
|
||||
inet_ntoa (p->prefix),
|
||||
p->prefixlen,
|
||||
inet_ntoa (**api.nexthop));
|
||||
p->prefixlen, inet_ntoa (**api.nexthop));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -545,7 +544,7 @@ ospf_redistribute_unset (struct ospf *ospf, int type)
|
|||
if (type == zclient->redist_default)
|
||||
return CMD_SUCCESS;
|
||||
|
||||
if (! ospf_is_type_redistributed (type))
|
||||
if (!ospf_is_type_redistributed (type))
|
||||
return CMD_SUCCESS;
|
||||
|
||||
zclient_redistribute_unset (zclient, type);
|
||||
|
@ -662,14 +661,13 @@ ospf_external_lsa_originate_check (struct ospf *ospf,
|
|||
|
||||
/* If connected prefix is OSPF enable interface, then do not announce. */
|
||||
int
|
||||
ospf_distribute_check_connected (struct ospf *ospf,
|
||||
struct external_info *ei)
|
||||
ospf_distribute_check_connected (struct ospf *ospf, struct external_info *ei)
|
||||
{
|
||||
struct route_node *rn;
|
||||
|
||||
for (rn = route_top (ospf->networks); rn; rn = route_next (rn))
|
||||
if (rn->info != NULL)
|
||||
if (prefix_match (&rn->p, (struct prefix *)&ei->p))
|
||||
if (prefix_match (&rn->p, (struct prefix *) &ei->p))
|
||||
{
|
||||
route_unlock_node (rn);
|
||||
return 0;
|
||||
|
@ -718,7 +716,7 @@ ospf_redistribute_check (struct ospf *ospf,
|
|||
{
|
||||
int ret;
|
||||
|
||||
ret = route_map_apply (ROUTEMAP (ospf, type), (struct prefix *)p,
|
||||
ret = route_map_apply (ROUTEMAP (ospf, type), (struct prefix *) p,
|
||||
RMAP_OSPF, ei);
|
||||
|
||||
if (ret == RMAP_DENYMATCH)
|
||||
|
@ -843,7 +841,7 @@ ospf_zebra_read_ipv4 (int command, struct zclient *zclient,
|
|||
else /* if (command == ZEBRA_IPV4_ROUTE_DELETE) */
|
||||
{
|
||||
ospf_external_info_delete (api.type, p);
|
||||
if ( !is_prefix_default (&p))
|
||||
if (!is_prefix_default (&p))
|
||||
ospf_external_lsa_flush (ospf, api.type, &p, ifindex, nexthop);
|
||||
else
|
||||
ospf_external_lsa_refresh_default (ospf);
|
||||
|
@ -851,8 +849,8 @@ ospf_zebra_read_ipv4 (int command, struct zclient *zclient,
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int
|
||||
ospf_distribute_list_out_set (struct ospf *ospf, int type, char *name)
|
||||
{
|
||||
|
@ -1018,8 +1016,8 @@ ospf_filter_update (struct access_list *access)
|
|||
if (IS_OSPF_ABR (ospf) && abr_inv)
|
||||
ospf_schedule_abr_task (ospf);
|
||||
}
|
||||
|
||||
|
||||
|
||||
struct ospf_distance *
|
||||
ospf_distance_new ()
|
||||
{
|
||||
|
@ -1101,8 +1099,8 @@ ospf_distance_unset (struct vty *vty, struct ospf *ospf, char *distance_str,
|
|||
|
||||
distance = atoi (distance_str);
|
||||
|
||||
rn = route_node_lookup (ospf->distance_table, (struct prefix *)&p);
|
||||
if (! rn)
|
||||
rn = route_node_lookup (ospf->distance_table, (struct prefix *) &p);
|
||||
if (!rn)
|
||||
{
|
||||
vty_out (vty, "Can't find specified prefix%s", VTY_NEWLINE);
|
||||
return CMD_WARNING;
|
||||
|
|
Loading…
Reference in a new issue