summaryrefslogtreecommitdiffstats
path: root/proto/ospf/lsack.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2009-07-05 19:01:54 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2009-07-05 19:01:54 +0200
commitf9bdcad4694cf80690982dfc58d28f91216c8bd0 (patch)
treea2bd8d812bf253bf3af87a6c9d58607baaa4ec50 /proto/ospf/lsack.c
parent2d785e8d6a646a878c970583aa54a15209fa0e6e (diff)
downloadbird-f9bdcad4694cf80690982dfc58d28f91216c8bd0.tar
bird-f9bdcad4694cf80690982dfc58d28f91216c8bd0.zip
Fixes type mismatch in OSPF printf statements.
Mixing ip_addr and u32 does bad things on Ultrasparc. Although both have the same size. Fascinating. It was not catched by compiler because of varargs.
Diffstat (limited to 'proto/ospf/lsack.c')
-rw-r--r--proto/ospf/lsack.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/proto/ospf/lsack.c b/proto/ospf/lsack.c
index 4652825..cc26666 100644
--- a/proto/ospf/lsack.c
+++ b/proto/ospf/lsack.c
@@ -43,7 +43,7 @@ ospf_lsack_enqueue(struct ospf_neighbor *n, struct ospf_lsa_header *h,
memcpy(&no->lsa, h, sizeof(struct ospf_lsa_header));
add_tail(&n->ackl[queue], NODE no);
DBG("Adding (%s) ack for %I, ID: %I, RT: %I, Type: %u\n", s_queue[queue],
- n->rid, ntohl(h->id), ntohl(h->rt), h->type);
+ ipa_from_u32(n->rid), ipa_from_u32(ntohl(h->id)), ipa_from_u32(ntohl(h->rt)), h->type);
}
void
@@ -77,8 +77,8 @@ ospf_lsack_send(struct ospf_neighbor *n, int queue)
no = (struct lsah_n *) HEAD(n->ackl[queue]);
memcpy(h + i, &no->lsa, sizeof(struct ospf_lsa_header));
i++;
- DBG("Iter %u ID: %I, RT: %I, Type: %u\n", i, ntohl((h + i)->id),
- ntohl((h + i)->rt), (h + i)->type);
+ DBG("Iter %u ID: %I, RT: %I, Type: %u\n", i, ipa_from_u32(ntohl((h + i)->id)),
+ ipa_from_u32(ntohl((h + i)->rt)), (h + i)->type);
rem_node(NODE no);
mb_free(no);
if ((i * sizeof(struct ospf_lsa_header) +
@@ -191,7 +191,7 @@ ospf_lsack_receive(struct ospf_lsack_packet *ps,
}
DBG("Deleting LS Id: %I RT: %I Type: %u from LS Retl for neighbor %I\n",
- lsa.id, lsa.rt, lsa.type, n->rid);
+ ipa_from_u32(lsa.id), ipa_from_u32(lsa.rt), lsa.type, ipa_from_u32(n->rid));
s_rem_node(SNODE en);
if (en->lsa_body != NULL)
mb_free(en->lsa_body);