if (IS_DEBUG_OSPF_EVENT)
zlog_debug(
- "ospf_ia_network_route(): processing summary route to %s/%d",
- inet_ntoa(p->prefix), p->prefixlen);
+ "ospf_ia_network_route(): processing summary route to %pFX",
+ p);
/* Find a route to the same dest */
if ((rn1 = route_node_lookup(rt, (struct prefix *)p))) {
if ((or = rn1->info)) {
if (IS_DEBUG_OSPF_EVENT)
zlog_debug(
- "ospf_ia_network_route(): "
- "Found a route to the same network");
+ "ospf_ia_network_route(): Found a route to the same network");
/* Check the existing route. */
if ((res = ospf_route_cmp(ospf, new_or, or)) < 0) {
/* New route is better, so replace old one. */
else { /* no route */
if (IS_DEBUG_OSPF_EVENT)
zlog_debug(
- "ospf_ia_network_route(): add new route to %s/%d",
- inet_ntoa(p->prefix), p->prefixlen);
+ "ospf_ia_network_route(): add new route to %pFX",
+ p);
ospf_route_add(rt, p, new_or, abr_or);
}
}
int ret;
if (IS_DEBUG_OSPF_EVENT)
- zlog_debug("ospf_ia_router_route(): considering %s/%d",
- inet_ntoa(p->prefix), p->prefixlen);
+ zlog_debug("ospf_ia_router_route(): considering %pFX", p);
+
/* Find a route to the same dest */
rn = route_node_get(rtrs, (struct prefix *)p);
if (or) {
if (IS_DEBUG_OSPF_EVENT)
zlog_debug(
- "ospf_ia_router_route(): "
- "a route to the same ABR through the same area exists");
+ "ospf_ia_router_route(): a route to the same ABR through the same area exists");
/* New route is better */
if ((ret = ospf_route_cmp(ospf, new_or, or)) < 0) {
listnode_delete(rn->info, or);
struct ospf_route *abr_or, *new_or;
struct summary_lsa *sl;
struct prefix_ipv4 p, abr;
- u_int32_t metric;
+ uint32_t metric;
if (lsa == NULL)
return 0;
sl = (struct summary_lsa *)lsa->data;
if (IS_DEBUG_OSPF_EVENT)
- zlog_debug("process_summary_lsa(): LS ID: %s",
- inet_ntoa(sl->header.id));
+ zlog_debug("process_summary_lsa(): LS ID: %pI4",
+ &sl->header.id);
metric = GET_METRIC(sl->metric);
struct route_node *rn;
struct ospf_route * or, *abr_or, *new_or;
struct prefix_ipv4 abr;
- u_int32_t cost;
+ uint32_t cost;
abr.family = AF_INET;
abr.prefix = lsa->header.adv_router;
backbone paths */
if (IS_DEBUG_OSPF_EVENT)
zlog_debug(
- "ospf_update_network_route(): "
- "Allowing Shortcut ABR to add new route");
+ "ospf_update_network_route(): Allowing Shortcut ABR to add new route");
new_or = ospf_route_new();
new_or->type = OSPF_DESTINATION_NETWORK;
new_or->id = lsa->header.id;
or->u.std.area_id)) {
if (IS_DEBUG_OSPF_EVENT)
zlog_debug(
- "ospf_update_network_route(): Shortcut: "
- "this intra-area path is not backbone");
+ "ospf_update_network_route(): Shortcut: this intra-area path is not backbone");
return;
}
} else /* Not Shortcut ABR */
if (!OSPF_IS_AREA_ID_BACKBONE(or->u.std.area_id)) {
if (IS_DEBUG_OSPF_EVENT)
zlog_debug(
- "ospf_update_network_route(): "
- "route is not BB-associated");
+ "ospf_update_network_route(): route is not BB-associated");
return; /* We can update only BB routes */
}
}
if (or->cost == cost) {
if (IS_DEBUG_OSPF_EVENT)
zlog_debug(
- "ospf_update_network_route(): "
- "new route is same distance, adding nexthops");
+ "ospf_update_network_route(): new route is same distance, adding nexthops");
ospf_route_copy_nexthops(or, abr_or->paths);
}
if (or->cost > cost) {
if (IS_DEBUG_OSPF_EVENT)
zlog_debug(
- "ospf_update_network_route(): "
- "new route is better, overriding nexthops");
+ "ospf_update_network_route(): new route is better, overriding nexthops");
ospf_route_subst_nexthops(or, abr_or->paths);
or->cost = cost;
{
struct ospf_route * or, *abr_or, *new_or;
struct prefix_ipv4 abr;
- u_int32_t cost;
+ uint32_t cost;
abr.family = AF_INET;
abr.prefix = lsa->header.adv_router;
struct ospf *ospf = area->ospf;
struct summary_lsa *sl;
struct prefix_ipv4 p;
- u_int32_t metric;
+ uint32_t metric;
if (lsa == NULL)
return 0;
sl = (struct summary_lsa *)lsa->data;
if (IS_DEBUG_OSPF_EVENT)
- zlog_debug("process_transit_summaries(): LS ID: %s",
- inet_ntoa(lsa->data->id));
+ zlog_debug("process_transit_summaries(): LS ID: %pI4",
+ &lsa->data->id);
metric = GET_METRIC(sl->metric);
if (metric == OSPF_LS_INFINITY) {
void ospf_ia_routing(struct ospf *ospf, struct route_table *rt,
struct route_table *rtrs)
{
+ struct listnode *node;
struct ospf_area *area;
if (IS_DEBUG_OSPF_EVENT)
zlog_debug("ospf_ia_routing():start");
if (IS_OSPF_ABR(ospf)) {
- struct listnode *node;
- struct ospf_area *area;
-
switch (ospf->abr_type) {
case OSPF_ABR_STAND:
if (IS_DEBUG_OSPF_EVENT)
zlog_debug("ospf_ia_routing():Standard ABR");
if ((area = ospf->backbone)) {
- struct listnode *node;
-
if (IS_DEBUG_OSPF_EVENT) {
zlog_debug(
"ospf_ia_routing():backbone area found");
*/
if (IS_DEBUG_OSPF_EVENT)
zlog_debug(
- "ospf_ia_routing(): "
- "Active BB connection not found");
+ "ospf_ia_routing(): Active BB connection not found");
for (ALL_LIST_ELEMENTS_RO(ospf->areas, node,
area))
OSPF_EXAMINE_SUMMARIES_ALL(area, rt,
break;
}
} else {
- struct listnode *node;
-
if (IS_DEBUG_OSPF_EVENT)
zlog_debug(
"ospf_ia_routing():not ABR, considering all areas");