]> git.puffer.fish Git - matthieu/frr.git/commitdiff
2004-10-31 Paul Jakma <paul@dishone.st>
authorpaul <paul>
Sun, 31 Oct 2004 18:01:13 +0000 (18:01 +0000)
committerpaul <paul>
Sun, 31 Oct 2004 18:01:13 +0000 (18:01 +0000)
* ospf_packet.c: (ospf_ls_upd_packet_new) Format for size_t should
          be ld.
* ospf_zebra.c: (ospf_distribute_list_update_timer) Ugly misuse of
  THREAD_ARG to store an integer, but it should at least use same
          same type to retrieve the value. Assert value is sane.

ospfd/ChangeLog
ospfd/ospf_packet.c
ospfd/ospf_zebra.c

index 8fd6f8271bd61165d7ca577670e6a8e7e19879e6..d174337a5cf9c498872d5fe9f88aaa99f1546239 100644 (file)
@@ -5,6 +5,9 @@
          ospf_write_frags.
          (ospf_ls_upd_packet_new) print size in debug output when too large
          packet is encountered.
+       * ospf_zebra.c: (ospf_distribute_list_update_timer) Ugly misuse of
+         THREAD_ARG to store an integer, but it should at least use same
+          same type to retrieve the value. Assert value is sane.
 
 2004-10-22 Paul Jakma <paul@dishone.st>
 
index de66bcbaa2095fb0359fa351db241c8f1ab7a382..2664b4ead2da9a419d8c7ca0240e3e771b128d8f 100644 (file)
@@ -3246,7 +3246,7 @@ ospf_ls_upd_packet_new (struct list *update, struct ospf_interface *oi)
   if (size > OSPF_MAX_PACKET_SIZE)
     {
       zlog_warn ("ospf_ls_upd_packet_new: oversized LSA id:%s too big,"
-                 " %d bytes, packet size %d, dropping it completely."
+                 " %d bytes, packet size %ld, dropping it completely."
                  " OSPF routing is broken!",
                  inet_ntoa (lsa->data->id), ntohs (lsa->data->length),
                  size);
index 331c27c03f65a0f4c642f07975c3ba2ed43c3109..646c8ed7fc5f1a64ebec933516b35c2522ee48d6 100644 (file)
@@ -929,10 +929,12 @@ ospf_distribute_list_update_timer (struct thread *thread)
   struct external_info *ei;
   struct route_table *rt;
   struct ospf_lsa *lsa;
-  u_char type;
+  int type;
   struct ospf *ospf;
 
   type = (int) THREAD_ARG (thread);
+  assert (type < ZEBRA_ROUTE_MAX);
+  
   rt = EXTERNAL_INFO (type);
 
   ospf = ospf_lookup ();