1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

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.
This commit is contained in:
Ondrej Zajicek
2009-07-05 19:01:54 +02:00
parent 2d785e8d6a
commit f9bdcad469
3 changed files with 22 additions and 21 deletions

View File

@@ -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);