]> git.puffer.fish Git - mirror/frr.git/commitdiff
2003-06-26: Mikael Lonnroth <gml@advancevpn.com>
authorpaul <paul>
Thu, 26 Jun 2003 03:00:40 +0000 (03:00 +0000)
committerpaul <paul>
Thu, 26 Jun 2003 03:00:40 +0000 (03:00 +0000)
* ospf_packet.c: (ospf_ls_upd_send_queue_event) clean up list node
  and unlock lsa if we break early. (eg packet size too large).

ospfd/ospf_packet.c

index e233ce0cd6b28690afed5adddb27d9c67d6d08d2..89d35c5847d282e199904941a6a4935cfc05f321 100644 (file)
@@ -2708,7 +2708,12 @@ ospf_make_ls_upd (struct ospf_interface *oi, list update, struct stream *s)
 
       /* Check packet size. */
       if (length + delta + ntohs (lsa->data->length) > OSPF_PACKET_MAX (oi))
-       break;
+        {
+          /* clean up */
+          list_delete_node (update, node);
+          ospf_lsa_unlock (lsa);
+          break;
+        }
       
       /* Keep pointer to LS age. */
       lsah = (struct lsa_header *) (STREAM_DATA (s) + stream_get_putp (s));