]> git.proxmox.com Git - mirror_frr.git/blobdiff - ospfd/ospf_flood.c
zebra: Allow ns delete to happen after under/over flow checks
[mirror_frr.git] / ospfd / ospf_flood.c
index aac2f3ee92834b23c54630206394bdb3734faafa..714c47b4e67c5d7ac511f4ea4242e40df1433710 100644 (file)
@@ -108,7 +108,7 @@ struct external_info *ospf_external_info_check(struct ospf *ospf,
                        struct listnode *node;
                        struct ospf_external *ext;
 
-                       ext_list = om->external[type];
+                       ext_list = ospf->external[type];
                        if (!ext_list)
                                continue;
 
@@ -218,7 +218,7 @@ static void ospf_process_self_originated_lsa(struct ospf *ospf,
                break;
        case OSPF_OPAQUE_AS_LSA:
                ospf_opaque_lsa_refresh(new);
-                       /* Reconsideration may needed. */ /* XXX */
+               /* Reconsideration may needed. */ /* XXX */
                break;
        default:
                break;
@@ -319,7 +319,7 @@ int ospf_flood(struct ospf *ospf, struct ospf_neighbor *nbr,
 
        /* Do some internal house keeping that is needed here */
        SET_FLAG(new->flags, OSPF_LSA_RECEIVED);
-       ospf_lsa_is_self_originated(ospf, new); /* Let it set the flag */
+       (void)ospf_lsa_is_self_originated(ospf, new); /* Let it set the flag */
 
        /* Install the new LSA in the link state database
           (replacing the current database copy).  This may cause the
@@ -361,9 +361,9 @@ static int ospf_flood_through_interface(struct ospf_interface *oi,
        if (IS_DEBUG_OSPF_EVENT)
                zlog_debug(
                        "ospf_flood_through_interface(): "
-                       "considering int %s, INBR(%s), LSA[%s]",
+                       "considering int %s, INBR(%s), LSA[%s] AGE %u",
                        IF_NAME(oi), inbr ? inet_ntoa(inbr->router_id) : "NULL",
-                       dump_lsa_key(lsa));
+                       dump_lsa_key(lsa), ntohs(lsa->data->ls_age));
 
        if (!ospf_if_is_enable(oi))
                return 0;
@@ -539,7 +539,6 @@ static int ospf_flood_through_interface(struct ospf_interface *oi,
            IP addresses for these packets are the neighbors' IP
            addresses.   */
        if (oi->type == OSPF_IFTYPE_NBMA) {
-               struct route_node *rn;
                struct ospf_neighbor *nbr;
 
                for (rn = route_top(oi->nbrs); rn; rn = route_next(rn))
@@ -563,6 +562,7 @@ int ospf_flood_through_area(struct ospf_area *area, struct ospf_neighbor *inbr,
        struct ospf_interface *oi;
        int lsa_ack_flag = 0;
 
+       assert(area);
        /* All other types are specific to a single area (Area A).  The
           eligible interfaces are all those interfaces attaching to the
           Area A.  If Area A is the backbone, this includes all the virtual
@@ -809,8 +809,7 @@ struct ospf_lsa *ospf_ls_request_new(struct lsa_header *lsah)
 {
        struct ospf_lsa *new;
 
-       new = ospf_lsa_new();
-       new->data = ospf_lsa_data_new(OSPF_LSA_HEADER_SIZE);
+       new = ospf_lsa_new_and_data(OSPF_LSA_HEADER_SIZE);
        memcpy(new->data, lsah, OSPF_LSA_HEADER_SIZE);
 
        return new;
@@ -958,6 +957,9 @@ void ospf_lsa_flush_area(struct ospf_lsa *lsa, struct ospf_area *area)
           more time for the ACK to be received and avoid
           retransmissions */
        lsa->data->ls_age = htons(OSPF_LSA_MAXAGE);
+       if (IS_DEBUG_OSPF_EVENT)
+               zlog_debug("%s: MAXAGE set to LSA %s", __PRETTY_FUNCTION__,
+                          inet_ntoa(lsa->data->id));
        monotime(&lsa->tv_recv);
        lsa->tv_orig = lsa->tv_recv;
        ospf_flood_through_area(area, NULL, lsa);