summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpaul <paul>2004-10-31 18:01:13 +0000
committerpaul <paul>2004-10-31 18:01:13 +0000
commit64511f394a90602a31cbe1660be426c16439322c (patch)
tree197fd4d90a7c6a4b627a67a078e8ff6d1f2372cb
parent039b95776979c74f7d02719800f9d742338e815b (diff)
2004-10-31 Paul Jakma <paul@dishone.st>
* 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.
-rw-r--r--ospfd/ChangeLog3
-rw-r--r--ospfd/ospf_packet.c2
-rw-r--r--ospfd/ospf_zebra.c4
3 files changed, 7 insertions, 2 deletions
diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog
index 8fd6f827..d174337a 100644
--- a/ospfd/ChangeLog
+++ b/ospfd/ChangeLog
@@ -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>
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c
index de66bcba..2664b4ea 100644
--- a/ospfd/ospf_packet.c
+++ b/ospfd/ospf_packet.c
@@ -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);
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c
index 331c27c0..646c8ed7 100644
--- a/ospfd/ospf_zebra.c
+++ b/ospfd/ospf_zebra.c
@@ -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 ();