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:
paul 2003-06-19 02:13:25 +00:00
parent 72357f2b98
commit cf795c5ded

View file

@ -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", zlog_info ("Zebra: interface add %s index %d flags %ld metric %d mtu %d",
ifp->name, ifp->ifindex, ifp->flags, ifp->metric, ifp->mtu); 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)) if (!OSPF_IF_PARAM_CONFIGURED (IF_DEF_PARAMS (ifp), type))
{ {
@ -113,7 +113,8 @@ ospf_interface_delete (int command, struct zclient *zclient,
ifp->name); ifp->name);
if (IS_DEBUG_OSPF (zebra, ZEBRA_INTERFACE)) 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); ifp->name, ifp->ifindex, ifp->flags, ifp->metric, ifp->mtu);
#ifdef HAVE_SNMP #ifdef HAVE_SNMP
@ -207,9 +208,9 @@ ospf_interface_state_up (int command, struct zclient *zclient,
if (IS_DEBUG_OSPF (zebra, ZEBRA_INTERFACE)) if (IS_DEBUG_OSPF (zebra, ZEBRA_INTERFACE))
zlog_info ("Zebra: Interface[%s] state change to up.", ifp->name); 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; continue;
ospf_if_up (oi); ospf_if_up (oi);
@ -234,9 +235,9 @@ ospf_interface_state_down (int command, struct zclient *zclient,
if (IS_DEBUG_OSPF (zebra, ZEBRA_INTERFACE)) if (IS_DEBUG_OSPF (zebra, ZEBRA_INTERFACE))
zlog_info ("Zebra: Interface[%s] state change to down.", ifp->name); 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; continue;
ospf_if_down (oi); ospf_if_down (oi);
} }
@ -288,7 +289,7 @@ ospf_interface_address_delete (int command, struct zclient *zclient,
p.prefixlen = IPV4_MAX_PREFIXLEN; p.prefixlen = IPV4_MAX_PREFIXLEN;
rn = route_node_lookup (IF_OIFS (ifp), &p); rn = route_node_lookup (IF_OIFS (ifp), &p);
if (! rn) if (!rn)
return 0; return 0;
assert (rn->info); assert (rn->info);
@ -351,7 +352,7 @@ ospf_zebra_add (struct prefix_ipv4 *p, struct ospf_route *or)
/* Put prefix information. */ /* Put prefix information. */
psize = PSIZE (p->prefixlen); psize = PSIZE (p->prefixlen);
stream_putc (s, 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. */ /* Nexthop count. */
stream_putc (s, or->path->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", zlog_info ("Zebra: Route add %s/%d nexthop %s",
inet_ntoa (p->prefix), inet_ntoa (p->prefix),
p->prefixlen, p->prefixlen, inet_ntoa (path->nexthop));
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", zlog_info ("Zebra: Route delete %s/%d nexthop %s",
inet_ntoa (p->prefix), inet_ntoa (p->prefix),
p->prefixlen, p->prefixlen, inet_ntoa (**api.nexthop));
inet_ntoa (**api.nexthop));
} }
} }
} }
@ -545,7 +544,7 @@ ospf_redistribute_unset (struct ospf *ospf, int type)
if (type == zclient->redist_default) if (type == zclient->redist_default)
return CMD_SUCCESS; return CMD_SUCCESS;
if (! ospf_is_type_redistributed (type)) if (!ospf_is_type_redistributed (type))
return CMD_SUCCESS; return CMD_SUCCESS;
zclient_redistribute_unset (zclient, type); 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. */ /* If connected prefix is OSPF enable interface, then do not announce. */
int int
ospf_distribute_check_connected (struct ospf *ospf, ospf_distribute_check_connected (struct ospf *ospf, struct external_info *ei)
struct external_info *ei)
{ {
struct route_node *rn; struct route_node *rn;
for (rn = route_top (ospf->networks); rn; rn = route_next (rn)) for (rn = route_top (ospf->networks); rn; rn = route_next (rn))
if (rn->info != NULL) 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); route_unlock_node (rn);
return 0; return 0;
@ -718,7 +716,7 @@ ospf_redistribute_check (struct ospf *ospf,
{ {
int ret; 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); RMAP_OSPF, ei);
if (ret == RMAP_DENYMATCH) if (ret == RMAP_DENYMATCH)
@ -843,7 +841,7 @@ ospf_zebra_read_ipv4 (int command, struct zclient *zclient,
else /* if (command == ZEBRA_IPV4_ROUTE_DELETE) */ else /* if (command == ZEBRA_IPV4_ROUTE_DELETE) */
{ {
ospf_external_info_delete (api.type, p); 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); ospf_external_lsa_flush (ospf, api.type, &p, ifindex, nexthop);
else else
ospf_external_lsa_refresh_default (ospf); ospf_external_lsa_refresh_default (ospf);
@ -851,8 +849,8 @@ ospf_zebra_read_ipv4 (int command, struct zclient *zclient,
return 0; return 0;
} }
int int
ospf_distribute_list_out_set (struct ospf *ospf, int type, char *name) 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) if (IS_OSPF_ABR (ospf) && abr_inv)
ospf_schedule_abr_task (ospf); ospf_schedule_abr_task (ospf);
} }
struct ospf_distance * struct ospf_distance *
ospf_distance_new () ospf_distance_new ()
{ {
@ -1101,8 +1099,8 @@ ospf_distance_unset (struct vty *vty, struct ospf *ospf, char *distance_str,
distance = atoi (distance_str); distance = atoi (distance_str);
rn = route_node_lookup (ospf->distance_table, (struct prefix *)&p); rn = route_node_lookup (ospf->distance_table, (struct prefix *) &p);
if (! rn) if (!rn)
{ {
vty_out (vty, "Can't find specified prefix%s", VTY_NEWLINE); vty_out (vty, "Can't find specified prefix%s", VTY_NEWLINE);
return CMD_WARNING; return CMD_WARNING;