]> git.proxmox.com Git - mirror_frr.git/blobdiff - ospfd/ospf_nsm.c
*: conform with COMMUNITY.md formatting rules, via 'make indent'
[mirror_frr.git] / ospfd / ospf_nsm.c
index a0ff2bfccf8684f817ad2cf152bee22925bf10f8..b83c9dec2ca0ea09e7842a00a981c8962b405869 100644 (file)
@@ -279,38 +279,38 @@ static int nsm_negotiation_done(struct ospf_neighbor *nbr)
        /* Send proactive ARP requests */
        ospf_proactively_arp(nbr);
 
-       LSDB_LOOP(ROUTER_LSDB(area), rn, lsa)
-       ospf_db_summary_add(nbr, lsa);
-       LSDB_LOOP(NETWORK_LSDB(area), rn, lsa)
-       ospf_db_summary_add(nbr, lsa);
-       LSDB_LOOP(SUMMARY_LSDB(area), rn, lsa)
-       ospf_db_summary_add(nbr, lsa);
-       LSDB_LOOP(ASBR_SUMMARY_LSDB(area), rn, lsa)
-       ospf_db_summary_add(nbr, lsa);
+       LSDB_LOOP (ROUTER_LSDB(area), rn, lsa)
+               ospf_db_summary_add(nbr, lsa);
+       LSDB_LOOP (NETWORK_LSDB(area), rn, lsa)
+               ospf_db_summary_add(nbr, lsa);
+       LSDB_LOOP (SUMMARY_LSDB(area), rn, lsa)
+               ospf_db_summary_add(nbr, lsa);
+       LSDB_LOOP (ASBR_SUMMARY_LSDB(area), rn, lsa)
+               ospf_db_summary_add(nbr, lsa);
 
        /* Process only if the neighbor is opaque capable. */
        if (CHECK_FLAG(nbr->options, OSPF_OPTION_O)) {
-               LSDB_LOOP(OPAQUE_LINK_LSDB(area), rn, lsa)
-               ospf_db_summary_add(nbr, lsa);
-               LSDB_LOOP(OPAQUE_AREA_LSDB(area), rn, lsa)
-               ospf_db_summary_add(nbr, lsa);
+               LSDB_LOOP (OPAQUE_LINK_LSDB(area), rn, lsa)
+                       ospf_db_summary_add(nbr, lsa);
+               LSDB_LOOP (OPAQUE_AREA_LSDB(area), rn, lsa)
+                       ospf_db_summary_add(nbr, lsa);
        }
 
        if (CHECK_FLAG(nbr->options, OSPF_OPTION_NP)) {
-               LSDB_LOOP(NSSA_LSDB(area), rn, lsa)
-               ospf_db_summary_add(nbr, lsa);
+               LSDB_LOOP (NSSA_LSDB(area), rn, lsa)
+                       ospf_db_summary_add(nbr, lsa);
        }
 
        if (nbr->oi->type != OSPF_IFTYPE_VIRTUALLINK
            && area->external_routing == OSPF_AREA_DEFAULT)
-               LSDB_LOOP(EXTERNAL_LSDB(nbr->oi->ospf), rn, lsa)
-       ospf_db_summary_add(nbr, lsa);
+               LSDB_LOOP (EXTERNAL_LSDB(nbr->oi->ospf), rn, lsa)
+                       ospf_db_summary_add(nbr, lsa);
 
        if (CHECK_FLAG(nbr->options, OSPF_OPTION_O)
            && (nbr->oi->type != OSPF_IFTYPE_VIRTUALLINK
                && area->external_routing == OSPF_AREA_DEFAULT))
-               LSDB_LOOP(OPAQUE_AS_LSDB(nbr->oi->ospf), rn, lsa)
-       ospf_db_summary_add(nbr, lsa);
+               LSDB_LOOP (OPAQUE_AS_LSDB(nbr->oi->ospf), rn, lsa)
+                       ospf_db_summary_add(nbr, lsa);
 
        return 0;
 }
@@ -702,12 +702,13 @@ static void nsm_change_state(struct ospf_neighbor *nbr, int state)
                                                        oi->ospf);
                }
 
-               zlog_info(
-                       "nsm_change_state(%s, %s -> %s): "
-                       "scheduling new router-LSA origination",
-                       inet_ntoa(nbr->router_id),
-                       lookup_msg(ospf_nsm_state_msg, old_state, NULL),
-                       lookup_msg(ospf_nsm_state_msg, state, NULL));
+               if (CHECK_FLAG(oi->ospf->config, OSPF_LOG_ADJACENCY_DETAIL))
+                       zlog_info(
+                               "%s:(%s, %s -> %s): "
+                               "scheduling new router-LSA origination",
+                               __PRETTY_FUNCTION__, inet_ntoa(nbr->router_id),
+                               lookup_msg(ospf_nsm_state_msg, old_state, NULL),
+                               lookup_msg(ospf_nsm_state_msg, state, NULL));
 
                ospf_router_lsa_update_area(oi->area);