diff options
author | paul <paul> | 2006-05-15 10:39:30 +0000 |
---|---|---|
committer | paul <paul> | 2006-05-15 10:39:30 +0000 |
commit | 38ce517e7c63d925b22c807e0c64b39d1c795497 (patch) | |
tree | b3b01b95e50dd32cbb7095fb2cec57b5aeb441a8 /ospf6d/ospf6_asbr.c | |
parent | b1fe9b72c02d4be19d4b99be0648684d1c64405e (diff) | |
download | quagga-38ce517e7c63d925b22c807e0c64b39d1c795497.tar.bz2 quagga-38ce517e7c63d925b22c807e0c64b39d1c795497.tar.xz |
[ospf6d] Import GNU Zebra CVSps#3559: Fix inter-area as-ext bug, cleanup debug
2005-10-06 Yasuhiro Ohara <yasu@sfc.wide.ad.jp>
* ospf6_asbr.c: fix bug of calculating AS-External routes
in other areas. Add debugging function for border-router
calculation.
* ospf6d.h: version 0.9.7p
Diffstat (limited to 'ospf6d/ospf6_asbr.c')
-rw-r--r-- | ospf6d/ospf6_asbr.c | 36 |
1 files changed, 14 insertions, 22 deletions
diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c index 286b5c1b..7980a643 100644 --- a/ospf6d/ospf6_asbr.c +++ b/ospf6d/ospf6_asbr.c @@ -294,45 +294,43 @@ ospf6_asbr_lsa_remove (struct ospf6_lsa *lsa) void ospf6_asbr_lsentry_add (struct ospf6_route *asbr_entry) { - char buf[64]; struct ospf6_lsa *lsa; u_int16_t type; u_int32_t router; - if (IS_OSPF6_DEBUG_EXAMIN (AS_EXTERNAL)) + if (! CHECK_FLAG (asbr_entry->flag, OSPF6_ROUTE_BEST)) { - ospf6_linkstate_prefix2str (&asbr_entry->prefix, buf, sizeof (buf)); - zlog_debug ("New ASBR %s found", buf); + char buf[16]; + inet_ntop (AF_INET, &ADV_ROUTER_IN_PREFIX (&asbr_entry->prefix), + buf, sizeof (buf)); + zlog_info ("ignore non-best path: lsentry %s add", buf); + return; } type = htons (OSPF6_LSTYPE_AS_EXTERNAL); router = ospf6_linkstate_prefix_adv_router (&asbr_entry->prefix); - for (lsa = ospf6_lsdb_type_router_head (type, router, ospf6->lsdb); - lsa; lsa = ospf6_lsdb_type_router_next (type, router, lsa)) + for (lsa = ospf6_lsdb_type_router_head (type, router, ospf6->lsdb); lsa; + lsa = ospf6_lsdb_type_router_next (type, router, lsa)) { if (! OSPF6_LSA_IS_MAXAGE (lsa)) ospf6_asbr_lsa_add (lsa); } - - if (IS_OSPF6_DEBUG_EXAMIN (AS_EXTERNAL)) - { - ospf6_linkstate_prefix2str (&asbr_entry->prefix, buf, sizeof (buf)); - zlog_debug ("Calculation for new ASBR %s done", buf); - } } void ospf6_asbr_lsentry_remove (struct ospf6_route *asbr_entry) { - char buf[64]; struct ospf6_lsa *lsa; u_int16_t type; u_int32_t router; - if (IS_OSPF6_DEBUG_EXAMIN (AS_EXTERNAL)) + if (! CHECK_FLAG (asbr_entry->flag, OSPF6_ROUTE_BEST)) { - ospf6_linkstate_prefix2str (&asbr_entry->prefix, buf, sizeof (buf)); - zlog_debug ("ASBR %s disappeared", buf); + char buf[16]; + inet_ntop (AF_INET, &ADV_ROUTER_IN_PREFIX (&asbr_entry->prefix), + buf, sizeof (buf)); + zlog_info ("ignore non-best path: lsentry %s remove", buf); + return; } type = htons (OSPF6_LSTYPE_AS_EXTERNAL); @@ -340,12 +338,6 @@ ospf6_asbr_lsentry_remove (struct ospf6_route *asbr_entry) for (lsa = ospf6_lsdb_type_router_head (type, router, ospf6->lsdb); lsa; lsa = ospf6_lsdb_type_router_next (type, router, lsa)) ospf6_asbr_lsa_remove (lsa); - - if (IS_OSPF6_DEBUG_EXAMIN (AS_EXTERNAL)) - { - ospf6_linkstate_prefix2str (&asbr_entry->prefix, buf, sizeof (buf)); - zlog_debug ("Calculation for old ASBR %s done", buf); - } } |