]> git.proxmox.com Git - mirror_frr.git/blob - ospfd/ospf_ia.c
2003-08-10 amir <amir@datacore.ch>
[mirror_frr.git] / ospfd / ospf_ia.c
1 /*
2 * OSPF inter-area routing.
3 * Copyright (C) 1999, 2000 Alex Zinin, Toshiaki Takada
4 *
5 * This file is part of GNU Zebra.
6 *
7 * GNU Zebra is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation; either version 2, or (at your option) any
10 * later version.
11 *
12 * GNU Zebra is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with GNU Zebra; see the file COPYING. If not, write to the Free
19 * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
20 * 02111-1307, USA.
21 */
22
23
24 #include <zebra.h>
25
26 #include "thread.h"
27 #include "memory.h"
28 #include "hash.h"
29 #include "linklist.h"
30 #include "prefix.h"
31 #include "table.h"
32 #include "log.h"
33
34 #include "ospfd/ospfd.h"
35 #include "ospfd/ospf_interface.h"
36 #include "ospfd/ospf_ism.h"
37 #include "ospfd/ospf_asbr.h"
38 #include "ospfd/ospf_lsa.h"
39 #include "ospfd/ospf_lsdb.h"
40 #include "ospfd/ospf_neighbor.h"
41 #include "ospfd/ospf_nsm.h"
42 #include "ospfd/ospf_spf.h"
43 #include "ospfd/ospf_route.h"
44 #include "ospfd/ospf_ase.h"
45 #include "ospfd/ospf_abr.h"
46 #include "ospfd/ospf_ia.h"
47 #include "ospfd/ospf_dump.h"
48
49 #define DEBUG
50
51 struct ospf_route *
52 ospf_find_abr_route (struct route_table *rtrs,
53 struct prefix_ipv4 *abr,
54 struct ospf_area *area)
55 {
56 struct route_node *rn;
57 struct ospf_route *or;
58 listnode node;
59
60 if ((rn = route_node_lookup (rtrs, (struct prefix *) abr)) == NULL)
61 return NULL;
62
63 route_unlock_node (rn);
64
65 for (node = listhead ((list) rn->info); node; nextnode (node))
66 if ((or = getdata (node)) != NULL)
67 if (IPV4_ADDR_SAME (&or->u.std.area_id, &area->area_id) && (or->u.std.flags & ROUTER_LSA_BORDER))
68 return or;
69
70 return NULL;
71 }
72
73 void
74 ospf_ia_network_route (struct ospf *ospf, struct route_table *rt,
75 struct prefix_ipv4 *p, struct ospf_route *new_or,
76 struct ospf_route *abr_or)
77 {
78 struct route_node *rn1;
79 struct ospf_route *or;
80
81 if (IS_DEBUG_OSPF_EVENT)
82 zlog_info ("ospf_ia_network_route(): processing summary route to %s/%d",
83 inet_ntoa (p->prefix), p->prefixlen);
84
85 /* Find a route to the same dest */
86 if ((rn1 = route_node_lookup (rt, (struct prefix *) p)))
87 {
88 int res;
89
90 route_unlock_node (rn1);
91
92 if ((or = rn1->info))
93 {
94 if (IS_DEBUG_OSPF_EVENT)
95 zlog_info ("ospf_ia_network_route(): "
96 "Found a route to the same network");
97 /* Check the existing route. */
98 if ((res = ospf_route_cmp (ospf, new_or, or)) < 0)
99 {
100 /* New route is better, so replace old one. */
101 ospf_route_subst (rn1, new_or, abr_or);
102 }
103 else if (res == 0)
104 {
105 /* New and old route are equal, so next hops can be added. */
106 route_lock_node (rn1);
107 ospf_route_copy_nexthops (or, abr_or->paths);
108 route_unlock_node (rn1);
109
110 /* new route can be deleted, because existing route has been updated. */
111 ospf_route_free (new_or);
112 }
113 else
114 {
115 /* New route is worse, so free it. */
116 ospf_route_free (new_or);
117 return;
118 }
119 } /* if (or)*/
120 } /*if (rn1)*/
121 else
122 { /* no route */
123 if (IS_DEBUG_OSPF_EVENT)
124 zlog_info ("ospf_ia_network_route(): add new route to %s/%d",
125 inet_ntoa (p->prefix), p->prefixlen);
126 ospf_route_add (rt, p, new_or, abr_or);
127 }
128 }
129
130 void
131 ospf_ia_router_route (struct ospf *ospf, struct route_table *rtrs,
132 struct prefix_ipv4 *p,
133 struct ospf_route *new_or, struct ospf_route *abr_or)
134 {
135 struct ospf_route *or = NULL;
136 struct route_node *rn;
137 int ret;
138
139 if (IS_DEBUG_OSPF_EVENT)
140 zlog_info ("ospf_ia_router_route(): considering %s/%d",
141 inet_ntoa (p->prefix), p->prefixlen);
142 /* Find a route to the same dest */
143 rn = route_node_get (rtrs, (struct prefix *) p);
144
145 if (rn->info == NULL)
146 /* This is a new route */
147 rn->info = list_new ();
148 else
149 {
150 struct ospf_area *or_area;
151 or_area = ospf_area_lookup_by_area_id (ospf, new_or->u.std.area_id);
152 assert (or_area);
153 /* This is an additional route */
154 route_unlock_node (rn);
155 or = ospf_find_asbr_route_through_area (rtrs, p, or_area);
156 }
157
158 if (or)
159 {
160 if (IS_DEBUG_OSPF_EVENT)
161 zlog_info ("ospf_ia_router_route(): "
162 "a route to the same ABR through the same area exists");
163 /* New route is better */
164 if ((ret = ospf_route_cmp (ospf, new_or, or)) < 0)
165 {
166 listnode_delete (rn->info, or);
167 ospf_route_free (or);
168 /* proceed down */
169 }
170 /* Routes are the same */
171 else if (ret == 0)
172 {
173 if (IS_DEBUG_OSPF_EVENT)
174 zlog_info ("ospf_ia_router_route(): merging the new route");
175
176 ospf_route_copy_nexthops (or, abr_or->paths);
177 ospf_route_free (new_or);
178 return;
179 }
180 /* New route is worse */
181 else
182 {
183 if (IS_DEBUG_OSPF_EVENT)
184 zlog_info ("ospf_ia_router_route(): skipping the new route");
185 ospf_route_free (new_or);
186 return;
187 }
188 }
189
190 ospf_route_copy_nexthops (new_or, abr_or->paths);
191
192 if (IS_DEBUG_OSPF_EVENT)
193 zlog_info ("ospf_ia_router_route(): adding the new route");
194
195 listnode_add (rn->info, new_or);
196 }
197
198 \f
199 int
200 process_summary_lsa (struct ospf_area *area, struct route_table *rt,
201 struct route_table *rtrs, struct ospf_lsa *lsa)
202 {
203 struct ospf *ospf = area->ospf;
204 struct ospf_area_range *range;
205 struct ospf_route *abr_or, *new_or;
206 struct summary_lsa *sl;
207 struct prefix_ipv4 p, abr;
208 u_int32_t metric;
209
210 if (lsa == NULL)
211 return 0;
212
213 sl = (struct summary_lsa *) lsa->data;
214
215 if (IS_DEBUG_OSPF_EVENT)
216 zlog_info ("process_summary_lsa(): LS ID: %s", inet_ntoa (sl->header.id));
217
218 metric = GET_METRIC (sl->metric);
219
220 if (metric == OSPF_LS_INFINITY)
221 return 0;
222
223 if (IS_LSA_MAXAGE (lsa))
224 return 0;
225
226 if (ospf_lsa_is_self_originated (area->ospf, lsa))
227 return 0;
228
229 p.family = AF_INET;
230 p.prefix = sl->header.id;
231
232 if (sl->header.type == OSPF_SUMMARY_LSA)
233 p.prefixlen = ip_masklen (sl->mask);
234 else
235 p.prefixlen = IPV4_MAX_BITLEN;
236
237 apply_mask_ipv4 (&p);
238
239 if (sl->header.type == OSPF_SUMMARY_LSA &&
240 (range = ospf_area_range_match_any (ospf, &p)) &&
241 ospf_area_range_active (range))
242 return 0;
243
244 if (ospf->abr_type != OSPF_ABR_STAND &&
245 area->external_routing != OSPF_AREA_DEFAULT &&
246 p.prefix.s_addr == OSPF_DEFAULT_DESTINATION &&
247 p.prefixlen == 0)
248 return 0; /* Ignore summary default from a stub area */
249
250 abr.family = AF_INET;
251 abr.prefix = sl->header.adv_router;
252 abr.prefixlen = IPV4_MAX_BITLEN;
253 apply_mask_ipv4 (&abr);
254
255 abr_or = ospf_find_abr_route (rtrs, &abr, area);
256
257 if (abr_or == NULL)
258 return 0;
259
260 new_or = ospf_route_new ();
261 new_or->type = OSPF_DESTINATION_NETWORK;
262 new_or->id = sl->header.id;
263 new_or->mask = sl->mask;
264 new_or->u.std.options = sl->header.options;
265 new_or->u.std.origin = (struct lsa_header *) sl;
266 new_or->cost = abr_or->cost + metric;
267 new_or->u.std.area_id = area->area_id;
268 #ifdef HAVE_NSSA
269 new_or->u.std.external_routing = area->external_routing;
270 #endif /* HAVE_NSSA */
271 new_or->path_type = OSPF_PATH_INTER_AREA;
272
273 if (sl->header.type == OSPF_SUMMARY_LSA)
274 ospf_ia_network_route (ospf, rt, &p, new_or, abr_or);
275 else
276 {
277 new_or->type = OSPF_DESTINATION_ROUTER;
278 new_or->u.std.flags = ROUTER_LSA_EXTERNAL;
279 ospf_ia_router_route (ospf, rtrs, &p, new_or, abr_or);
280 }
281
282 return 0;
283 }
284
285 void
286 ospf_examine_summaries (struct ospf_area *area,
287 struct route_table *lsdb_rt,
288 struct route_table *rt,
289 struct route_table *rtrs)
290 {
291 struct ospf_lsa *lsa;
292 struct route_node *rn;
293
294 LSDB_LOOP (lsdb_rt, rn, lsa)
295 process_summary_lsa (area, rt, rtrs, lsa);
296 }
297
298 int
299 ospf_area_is_transit (struct ospf_area *area)
300 {
301 return (area->transit == OSPF_TRANSIT_TRUE) ||
302 ospf_full_virtual_nbrs(area); /* Cisco forgets to set the V-bit :( */
303 }
304
305 void
306 ospf_update_network_route (struct ospf *ospf,
307 struct route_table *rt,
308 struct route_table *rtrs,
309 struct summary_lsa *lsa,
310 struct prefix_ipv4 *p,
311 struct ospf_area *area)
312 {
313 struct route_node *rn;
314 struct ospf_route *or, *abr_or, *new_or;
315 struct prefix_ipv4 abr;
316 u_int32_t cost;
317
318 abr.family = AF_INET;
319 abr.prefix =lsa->header.adv_router;
320 abr.prefixlen = IPV4_MAX_BITLEN;
321 apply_mask_ipv4 (&abr);
322
323 abr_or = ospf_find_abr_route (rtrs, &abr, area);
324
325 if (abr_or == NULL)
326 {
327 if (IS_DEBUG_OSPF_EVENT)
328 zlog_info ("ospf_update_network_route(): can't find a route to the ABR");
329 return;
330 }
331
332 cost = abr_or->cost + GET_METRIC (lsa->metric);
333
334 rn = route_node_lookup (rt, (struct prefix *) p);
335
336 if (! rn)
337 {
338 if (ospf->abr_type != OSPF_ABR_SHORTCUT)
339 return; /* Standard ABR can update only already installed
340 backbone paths */
341 if (IS_DEBUG_OSPF_EVENT)
342 zlog_info ("ospf_update_network_route(): "
343 "Allowing Shortcut ABR to add new route");
344 new_or = ospf_route_new ();
345 new_or->type = OSPF_DESTINATION_NETWORK;
346 new_or->id = lsa->header.id;
347 new_or->mask = lsa->mask;
348 new_or->u.std.options = lsa->header.options;
349 new_or->u.std.origin = (struct lsa_header *) lsa;
350 new_or->cost = cost;
351 new_or->u.std.area_id = area->area_id;
352 #ifdef HAVE_NSSA
353 new_or->u.std.external_routing = area->external_routing;
354 #endif /* HAVE_NSSA */
355 new_or->path_type = OSPF_PATH_INTER_AREA;
356 ospf_route_add (rt, p, new_or, abr_or);
357
358 return;
359 }
360 else
361 {
362 route_unlock_node (rn);
363 if (rn->info == NULL)
364 return;
365 }
366
367 or = rn->info;
368
369 if (or->path_type != OSPF_PATH_INTRA_AREA &&
370 or->path_type != OSPF_PATH_INTER_AREA)
371 {
372 if (IS_DEBUG_OSPF_EVENT)
373 zlog_info ("ospf_update_network_route(): ERR: path type is wrong");
374 return;
375 }
376
377 if (ospf->abr_type == OSPF_ABR_SHORTCUT)
378 {
379 if (or->path_type == OSPF_PATH_INTRA_AREA &&
380 !OSPF_IS_AREA_ID_BACKBONE (or->u.std.area_id))
381 {
382 if (IS_DEBUG_OSPF_EVENT)
383 zlog_info ("ospf_update_network_route(): Shortcut: "
384 "this intra-area path is not backbone");
385 return;
386 }
387 }
388 else /* Not Shortcut ABR */
389 {
390 if (!OSPF_IS_AREA_ID_BACKBONE (or->u.std.area_id))
391 {
392 if (IS_DEBUG_OSPF_EVENT)
393 zlog_info ("ospf_update_network_route(): "
394 "route is not BB-associated");
395 return; /* We can update only BB routes */
396 }
397 }
398
399 if (or->cost < cost)
400 {
401 if (IS_DEBUG_OSPF_EVENT)
402 zlog_info ("ospf_update_network_route(): new route is worse");
403 return;
404 }
405
406 if (or->cost == cost)
407 {
408 if (IS_DEBUG_OSPF_EVENT)
409 zlog_info ("ospf_update_network_route(): "
410 "new route is same distance, adding nexthops");
411 ospf_route_copy_nexthops (or, abr_or->paths);
412 }
413
414 if (or->cost > cost)
415 {
416 if (IS_DEBUG_OSPF_EVENT)
417 zlog_info ("ospf_update_network_route(): "
418 "new route is better, overriding nexthops");
419 ospf_route_subst_nexthops (or, abr_or->paths);
420 or->cost = cost;
421
422 if ((ospf->abr_type == OSPF_ABR_SHORTCUT) &&
423 !OSPF_IS_AREA_ID_BACKBONE (or->u.std.area_id))
424 {
425 or->path_type = OSPF_PATH_INTER_AREA;
426 or->u.std.area_id = area->area_id;
427 #ifdef HAVE_NSSA
428 or->u.std.external_routing = area->external_routing;
429 #endif /* HAVE_NSSA */
430 /* Note that we can do this only in Shortcut ABR mode,
431 because standard ABR must leave the route type and area
432 unchanged
433 */
434 }
435 }
436 }
437
438 void
439 ospf_update_router_route (struct ospf *ospf,
440 struct route_table *rtrs,
441 struct summary_lsa *lsa,
442 struct prefix_ipv4 *p,
443 struct ospf_area *area)
444 {
445 struct ospf_route *or, *abr_or, *new_or;
446 struct prefix_ipv4 abr;
447 u_int32_t cost;
448
449 abr.family = AF_INET;
450 abr.prefix = lsa->header.adv_router;
451 abr.prefixlen = IPV4_MAX_BITLEN;
452 apply_mask_ipv4 (&abr);
453
454 abr_or = ospf_find_abr_route (rtrs, &abr, area);
455
456 if (abr_or == NULL)
457 {
458 if (IS_DEBUG_OSPF_EVENT)
459 zlog_info ("ospf_update_router_route(): can't find a route to the ABR");
460 return;
461 }
462
463 cost = abr_or->cost + GET_METRIC (lsa->metric);
464
465 /* First try to find a backbone path,
466 because standard ABR can update only BB-associated paths */
467
468 if ((ospf->backbone == NULL) &&
469 (ospf->abr_type != OSPF_ABR_SHORTCUT))
470
471 /* no BB area, not Shortcut ABR, exiting */
472 return;
473
474 or = ospf_find_asbr_route_through_area (rtrs, p, ospf->backbone);
475
476 if (or == NULL)
477 {
478 if (ospf->abr_type != OSPF_ABR_SHORTCUT)
479
480 /* route to ASBR through the BB not found
481 the router is not Shortcut ABR, exiting */
482
483 return;
484 else
485 /* We're a Shortcut ABR*/
486 {
487 /* Let it either add a new router or update the route
488 through the same (non-BB) area. */
489
490 new_or = ospf_route_new ();
491 new_or->type = OSPF_DESTINATION_ROUTER;
492 new_or->id = lsa->header.id;
493 new_or->mask = lsa->mask;
494 new_or->u.std.options = lsa->header.options;
495 new_or->u.std.origin = (struct lsa_header *)lsa;
496 new_or->cost = cost;
497 new_or->u.std.area_id = area->area_id;
498 #ifdef HAVE_NSSA
499 new_or->u.std.external_routing = area->external_routing;
500 #endif /* HAVE_NSSA */
501 new_or->path_type = OSPF_PATH_INTER_AREA;
502 new_or->u.std.flags = ROUTER_LSA_EXTERNAL;
503 ospf_ia_router_route (ospf, rtrs, p, new_or, abr_or);
504
505 return;
506 }
507 }
508
509 /* At this point the "or" is always bb-associated */
510
511 if (!(or->u.std.flags & ROUTER_LSA_EXTERNAL))
512 {
513 if (IS_DEBUG_OSPF_EVENT)
514 zlog_info ("ospf_upd_router_route(): the remote router is not an ASBR");
515 return;
516 }
517
518 if (or->path_type != OSPF_PATH_INTRA_AREA &&
519 or->path_type != OSPF_PATH_INTER_AREA)
520 return;
521
522 if (or->cost < cost)
523 return;
524
525 else if (or->cost == cost)
526 ospf_route_copy_nexthops (or, abr_or->paths);
527
528 else if (or->cost > cost)
529 {
530 ospf_route_subst_nexthops (or, abr_or->paths);
531 or->cost = cost;
532
533 /* Even if the ABR runs in Shortcut mode, we can't change
534 the path type and area, because the "or" is always bb-associated
535 at this point and even Shortcut ABR can't change these attributes */
536 }
537 }
538
539 int
540 process_transit_summary_lsa (struct ospf_area *area, struct route_table *rt,
541 struct route_table *rtrs, struct ospf_lsa *lsa)
542 {
543 struct ospf *ospf = area->ospf;
544 struct summary_lsa *sl;
545 struct prefix_ipv4 p;
546 u_int32_t metric;
547
548 if (lsa == NULL)
549 return 0;
550
551 sl = (struct summary_lsa *) lsa->data;
552
553 if (IS_DEBUG_OSPF_EVENT)
554 zlog_info ("process_transit_summaries(): LS ID: %s",
555 inet_ntoa (lsa->data->id));
556 metric = GET_METRIC (sl->metric);
557
558 if (metric == OSPF_LS_INFINITY)
559 {
560 if (IS_DEBUG_OSPF_EVENT)
561 zlog_info ("process_transit_summaries(): metric is infinity, skip");
562 return 0;
563 }
564
565 if (IS_LSA_MAXAGE (lsa))
566 {
567 if (IS_DEBUG_OSPF_EVENT)
568 zlog_info ("process_transit_summaries(): This LSA is too old");
569 return 0;
570 }
571
572 if (ospf_lsa_is_self_originated (area->ospf, lsa))
573 {
574 if (IS_DEBUG_OSPF_EVENT)
575 zlog_info ("process_transit_summaries(): This LSA is mine, skip");
576 return 0;
577 }
578
579 p.family = AF_INET;
580 p.prefix = sl->header.id;
581
582 if (sl->header.type == OSPF_SUMMARY_LSA)
583 p.prefixlen = ip_masklen (sl->mask);
584 else
585 p.prefixlen = IPV4_MAX_BITLEN;
586
587 apply_mask_ipv4 (&p);
588
589 if (sl->header.type == OSPF_SUMMARY_LSA)
590 ospf_update_network_route (ospf, rt, rtrs, sl, &p, area);
591 else
592 ospf_update_router_route (ospf, rtrs, sl, &p, area);
593
594 return 0;
595 }
596
597 void
598 ospf_examine_transit_summaries (struct ospf_area *area,
599 struct route_table *lsdb_rt,
600 struct route_table *rt,
601 struct route_table *rtrs)
602 {
603 struct ospf_lsa *lsa;
604 struct route_node *rn;
605
606 LSDB_LOOP (lsdb_rt, rn, lsa)
607 process_transit_summary_lsa (area, rt, rtrs, lsa);
608 }
609
610 void
611 ospf_ia_routing (struct ospf *ospf,
612 struct route_table *rt,
613 struct route_table *rtrs)
614 {
615 struct ospf_area * area;
616
617 if (IS_DEBUG_OSPF_EVENT)
618 zlog_info ("ospf_ia_routing():start");
619
620 if (IS_OSPF_ABR (ospf))
621 {
622 listnode node;
623 struct ospf_area *area;
624
625 switch (ospf->abr_type)
626 {
627 case OSPF_ABR_STAND:
628 if (IS_DEBUG_OSPF_EVENT)
629 zlog_info ("ospf_ia_routing():Standard ABR");
630
631 if ((area = ospf->backbone))
632 {
633 listnode node;
634
635 if (IS_DEBUG_OSPF_EVENT)
636 {
637 zlog_info ("ospf_ia_routing():backbone area found");
638 zlog_info ("ospf_ia_routing():examining summaries");
639 }
640
641 OSPF_EXAMINE_SUMMARIES_ALL (area, rt, rtrs);
642
643 for (node = listhead (ospf->areas); node; nextnode (node))
644 if ((area = getdata (node)) != NULL)
645 if (area != ospf->backbone)
646 if (ospf_area_is_transit (area))
647 OSPF_EXAMINE_TRANSIT_SUMMARIES_ALL (area, rt, rtrs);
648 }
649 else
650 if (IS_DEBUG_OSPF_EVENT)
651 zlog_info ("ospf_ia_routing():backbone area NOT found");
652 break;
653 case OSPF_ABR_IBM:
654 case OSPF_ABR_CISCO:
655 if (IS_DEBUG_OSPF_EVENT)
656 zlog_info ("ospf_ia_routing():Alternative Cisco/IBM ABR");
657 area = ospf->backbone; /* Find the BB */
658
659 /* If we have an active BB connection */
660 if (area && ospf_act_bb_connection (ospf))
661 {
662 if (IS_DEBUG_OSPF_EVENT)
663 {
664 zlog_info ("ospf_ia_routing(): backbone area found");
665 zlog_info ("ospf_ia_routing(): examining BB summaries");
666 }
667
668 OSPF_EXAMINE_SUMMARIES_ALL (area, rt, rtrs);
669
670 for (node = listhead (ospf->areas); node; nextnode (node))
671 if ((area = getdata (node)) != NULL)
672 if (area != ospf->backbone)
673 if (ospf_area_is_transit (area))
674 OSPF_EXAMINE_TRANSIT_SUMMARIES_ALL (area, rt, rtrs);
675 }
676 else
677 { /* No active BB connection--consider all areas */
678 if (IS_DEBUG_OSPF_EVENT)
679 zlog_info ("ospf_ia_routing(): "
680 "Active BB connection not found");
681 for (node = listhead (ospf->areas); node; nextnode (node))
682 if ((area = getdata (node)) != NULL)
683 OSPF_EXAMINE_SUMMARIES_ALL (area, rt, rtrs);
684 }
685 break;
686 case OSPF_ABR_SHORTCUT:
687 if (IS_DEBUG_OSPF_EVENT)
688 zlog_info ("ospf_ia_routing():Alternative Shortcut");
689 area = ospf->backbone; /* Find the BB */
690
691 /* If we have an active BB connection */
692 if (area && ospf_act_bb_connection (ospf))
693 {
694 if (IS_DEBUG_OSPF_EVENT)
695 {
696 zlog_info ("ospf_ia_routing(): backbone area found");
697 zlog_info ("ospf_ia_routing(): examining BB summaries");
698 }
699 OSPF_EXAMINE_SUMMARIES_ALL (area, rt, rtrs);
700 }
701
702 for (node = listhead (ospf->areas); node; nextnode (node))
703 if ((area = getdata (node)) != NULL)
704 if (area != ospf->backbone)
705 if (ospf_area_is_transit (area) ||
706 ((area->shortcut_configured != OSPF_SHORTCUT_DISABLE) &&
707 ((ospf->backbone == NULL) ||
708 ((area->shortcut_configured == OSPF_SHORTCUT_ENABLE) &&
709 area->shortcut_capability))))
710 OSPF_EXAMINE_TRANSIT_SUMMARIES_ALL (area, rt, rtrs);
711 break;
712 default:
713 break;
714 }
715 }
716 else
717 {
718 listnode node;
719
720 if (IS_DEBUG_OSPF_EVENT)
721 zlog_info ("ospf_ia_routing():not ABR, considering all areas");
722
723 for (node = listhead (ospf->areas); node; nextnode (node))
724 if ((area = getdata (node)) != NULL)
725 OSPF_EXAMINE_SUMMARIES_ALL (area, rt, rtrs);
726 }
727 }