]> git.proxmox.com Git - mirror_frr.git/blobdiff - ospfd/ospf_packet.c
lib: enforce vrf_name_to_id by returning default_vrf when name is null
[mirror_frr.git] / ospfd / ospf_packet.c
index c4c4d2f0303c6ac2abca34c34009d1b17a274dc7..3bb3b79a6a728481e75f041f88c5ad58cb786a3c 100644 (file)
@@ -525,7 +525,7 @@ int ospf_ls_upd_timer(struct thread *thread)
                if (listcount(update) > 0)
                        ospf_ls_upd_send(nbr, update, OSPF_SEND_PACKET_DIRECT,
                                         0);
-               list_delete_and_null(&update);
+               list_delete(&update);
        }
 
        /* Set LS Update retransmission timer. */
@@ -875,11 +875,9 @@ static int ospf_write(struct thread *thread)
        }
 
        /* If packets still remain in queue, call write thread. */
-       if (!list_isempty(ospf->oi_write_q)) {
-               ospf->t_write = NULL;
+       if (!list_isempty(ospf->oi_write_q))
                thread_add_write(master, ospf_write, ospf, ospf->fd,
                                 &ospf->t_write);
-       }
 
        return 0;
 }
@@ -1620,7 +1618,7 @@ static void ospf_ls_req(struct ip *iph, struct ospf_header *ospfh,
                /* Verify LSA type. */
                if (ls_type < OSPF_MIN_LSA || ls_type >= OSPF_MAX_LSA) {
                        OSPF_NSM_EVENT_SCHEDULE(nbr, NSM_BadLSReq);
-                       list_delete_and_null(&ls_upd);
+                       list_delete(&ls_upd);
                        return;
                }
 
@@ -1629,7 +1627,7 @@ static void ospf_ls_req(struct ip *iph, struct ospf_header *ospfh,
                                       adv_router);
                if (find == NULL) {
                        OSPF_NSM_EVENT_SCHEDULE(nbr, NSM_BadLSReq);
-                       list_delete_and_null(&ls_upd);
+                       list_delete(&ls_upd);
                        return;
                }
 
@@ -1664,9 +1662,9 @@ static void ospf_ls_req(struct ip *iph, struct ospf_header *ospfh,
                        ospf_ls_upd_send(nbr, ls_upd, OSPF_SEND_PACKET_INDIRECT,
                                         0);
 
-               list_delete_and_null(&ls_upd);
+               list_delete(&ls_upd);
        } else
-               list_delete_and_null(&ls_upd);
+               list_delete(&ls_upd);
 }
 
 /* Get the list of LSAs from Link State Update packet.
@@ -1811,7 +1809,7 @@ static void ospf_upd_list_clean(struct list *lsas)
        for (ALL_LIST_ELEMENTS(lsas, node, nnode, lsa))
                ospf_lsa_discard(lsa);
 
-       list_delete_and_null(&lsas);
+       list_delete(&lsas);
 }
 
 /* OSPF Link State Update message read -- RFC2328 Section 13. */
@@ -2215,7 +2213,7 @@ static void ospf_ls_upd(struct ospf *ospf, struct ip *iph,
 #undef DISCARD_LSA
 
        assert(listcount(lsas) == 0);
-       list_delete_and_null(&lsas);
+       list_delete(&lsas);
 }
 
 /* OSPF Link State Acknowledgment message read -- RFC2328 Section 13.7. */
@@ -3370,7 +3368,7 @@ static int ospf_make_db_desc(struct ospf_interface *oi,
                                if (IS_OPAQUE_LSA(lsa->data->type)
                                    && (!CHECK_FLAG(options, OSPF_OPTION_O))) {
                                        /* Suppress advertising
-                                        * opaque-informations. */
+                                        * opaque-information. */
                                        /* Remove LSA from DB summary list. */
                                        ospf_lsdb_delete(lsdb, lsa);
                                        continue;
@@ -3855,7 +3853,7 @@ void ospf_ls_upd_send_lsa(struct ospf_neighbor *nbr, struct ospf_lsa *lsa,
        else
                ospf_ls_upd_send(nbr, update, flag, 0);
 
-       list_delete_and_null(&update);
+       list_delete(&update);
 }
 
 /* Determine size for packet. Must be at least big enough to accomodate next
@@ -4016,7 +4014,7 @@ static int ospf_ls_upd_send_queue_event(struct thread *thread)
 
                /* list might not be empty. */
                if (listcount(update) == 0) {
-                       list_delete_and_null((struct list **)&rn->info);
+                       list_delete((struct list **)&rn->info);
                        route_unlock_node(rn);
                } else
                        again = 1;