]> git.proxmox.com Git - mirror_frr.git/blobdiff - ospfd/ospf_ia.c
zebra: Allow ns delete to happen after under/over flow checks
[mirror_frr.git] / ospfd / ospf_ia.c
index 38ce71293be15daeed1402133bf904170d04f204..f1ba8a31e87c0969221bd5b79f9998280e3cbb46 100644 (file)
@@ -196,7 +196,7 @@ static int process_summary_lsa(struct ospf_area *area, struct route_table *rt,
        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;
@@ -282,8 +282,8 @@ static void ospf_examine_summaries(struct ospf_area *area,
        struct ospf_lsa *lsa;
        struct route_node *rn;
 
-       LSDB_LOOP(lsdb_rt, rn, lsa)
-       process_summary_lsa(area, rt, rtrs, lsa);
+       LSDB_LOOP (lsdb_rt, rn, lsa)
+               process_summary_lsa(area, rt, rtrs, lsa);
 }
 
 int ospf_area_is_transit(struct ospf_area *area)
@@ -302,7 +302,7 @@ static void ospf_update_network_route(struct ospf *ospf, struct route_table *rt,
        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;
@@ -361,8 +361,10 @@ static void ospf_update_network_route(struct ospf *ospf, struct route_table *rt,
        }
 
        if (ospf->abr_type == OSPF_ABR_SHORTCUT) {
-               if (or->path_type == OSPF_PATH_INTRA_AREA
-                             && !OSPF_IS_AREA_ID_BACKBONE(or->u.std.area_id)) {
+               if (
+                       or->path_type == OSPF_PATH_INTRA_AREA
+                                 && !OSPF_IS_AREA_ID_BACKBONE(
+                                            or->u.std.area_id)) {
                        if (IS_DEBUG_OSPF_EVENT)
                                zlog_debug(
                                        "ospf_update_network_route(): Shortcut: "
@@ -425,7 +427,7 @@ static void ospf_update_router_route(struct ospf *ospf,
 {
        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;
@@ -521,7 +523,7 @@ static int process_transit_summary_lsa(struct ospf_area *area,
        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;
@@ -580,30 +582,26 @@ static void ospf_examine_transit_summaries(struct ospf_area *area,
        struct ospf_lsa *lsa;
        struct route_node *rn;
 
-       LSDB_LOOP(lsdb_rt, rn, lsa)
-       process_transit_summary_lsa(area, rt, rtrs, lsa);
+       LSDB_LOOP (lsdb_rt, rn, lsa)
+               process_transit_summary_lsa(area, rt, rtrs, lsa);
 }
 
 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");
@@ -648,7 +646,7 @@ void ospf_ia_routing(struct ospf *ospf, struct route_table *rt,
                                                        OSPF_EXAMINE_TRANSIT_SUMMARIES_ALL(
                                                                area, rt, rtrs);
                        } else { /* No active BB connection--consider all areas
-                                 */
+                                   */
                                if (IS_DEBUG_OSPF_EVENT)
                                        zlog_debug(
                                                "ospf_ia_routing(): "
@@ -692,8 +690,6 @@ void ospf_ia_routing(struct ospf *ospf, struct route_table *rt,
                        break;
                }
        } else {
-               struct listnode *node;
-
                if (IS_DEBUG_OSPF_EVENT)
                        zlog_debug(
                                "ospf_ia_routing():not ABR, considering all areas");