Commit 34a877cc authored by Ondřej Zajíček's avatar Ondřej Zajíček

Minor updates.

parent 8a70a13e
......@@ -172,12 +172,12 @@ ospf_lsack_receive(struct ospf_packet *ps_i, struct ospf_iface *ifa,
if ((lsa.sn == LSA_MAXSEQNO) && (lsa.age == LSA_MAXAGE))
continue;
OSPF_TRACE(D_PACKETS, "Strange LS acknoledgement from %I", n->ip);
OSPF_TRACE(D_PACKETS, "Id: %R, Rt: %R, Type: 0x%04x",
lsa.id, lsa.rt, lsa.type);
OSPF_TRACE(D_PACKETS, "I have: Age: %4u, Seqno: 0x%08x, Sum: 0x%04x",
OSPF_TRACE(D_PACKETS, "Strange LSACK from %I", n->ip);
OSPF_TRACE(D_PACKETS, "Type: %04x, Id: %R, Rt: %R",
lsa.type, lsa.id, lsa.rt);
OSPF_TRACE(D_PACKETS, "I have: Age: %4u, Seq: %08x, Sum: %04x",
en->lsa.age, en->lsa.sn, en->lsa.checksum);
OSPF_TRACE(D_PACKETS, "He has: Age: %4u, Seqno: 0x%08x, Sum: 0x%04x",
OSPF_TRACE(D_PACKETS, "He has: Age: %4u, Seq: %08x, Sum: %04x",
lsa.age, lsa.sn, lsa.checksum);
continue;
}
......
......@@ -14,7 +14,7 @@ flush_lsa(struct top_hash_entry *en, struct proto_ospf *po)
struct proto *p = &po->proto;
OSPF_TRACE(D_EVENTS,
"Going to remove node Type: %u, Id: %R, Rt: %R, Age: %u, SN: 0x%x",
"Going to remove LSA Type: %04x, Id: %R, Rt: %R, Age: %u, Seqno: 0x%x",
en->lsa.type, en->lsa.id, en->lsa.rt, en->lsa.age, en->lsa.sn);
s_rem_node(SNODE en);
if (en->lsa_body != NULL)
......@@ -143,6 +143,7 @@ ntohlsab(void *n, void *h, u16 type, u16 len)
hid[i] = ntohl(nid[i]);
}
/*
void
buf_dump(const char *hdr, const byte *buf, int blen)
{
......@@ -171,6 +172,7 @@ buf_dump(const char *hdr, const byte *buf, int blen)
*bp = 0;
log(L_WARN "%s\t%s", lhdr, b2);
}
*/
#define MODX 4102 /* larges signed value without overflow */
......
......@@ -28,8 +28,8 @@ static void ospf_dump_lsreq(struct proto *p, struct ospf_lsreq_packet *pkt)
sizeof(struct ospf_lsreq_header);
for (i = 0; i < j; i++)
log(L_TRACE "%s: LSR Id: %R, Rt: %R, Type: 0x%04x", p->name,
htonl(pkt->lsh[i].id), htonl(pkt->lsh[i].rt), htonl(pkt->lsh[i].type));
log(L_TRACE "%s: LSR Type: %04x, Id: %R, Rt: %R", p->name,
htonl(pkt->lsh[i].type), htonl(pkt->lsh[i].id), htonl(pkt->lsh[i].rt));
}
void
......@@ -135,7 +135,7 @@ ospf_lsreq_receive(struct ospf_packet *ps_i, struct ospf_iface *ifa,
add_tail(&uplist, NODE llsh);
if (ospf_hash_find(po->gr, dom, hid, hrt, htype) == NULL)
{
log(L_WARN "Received bad LS req from: %I looking: Type: %u, ID: %R, RT: %R",
log(L_WARN "Received bad LSREQ from %I: Type: %04x, Id: %R, Rt: %R",
n->ip, htype, hid, hrt);
ospf_neigh_sm(n, INM_BADLSREQ);
rfree(upslab);
......
......@@ -22,8 +22,8 @@ void ospf_dump_lsahdr(struct proto *p, struct ospf_lsa_header *lsa_n)
struct ospf_lsa_header lsa;
ntohlsah(lsa_n, &lsa);
log(L_TRACE "%s: LSA Id: %R, Rt: %R, Type: 0x%04x, Age: %u, Seqno: 0x%08x, Sum: 0x%04x",
p->name, lsa.id, lsa.rt, lsa.type, lsa.age, lsa.sn, lsa.checksum);
log(L_TRACE "%s: LSA Type: %04x, Id: %R, Rt: %R, Age: %u, Seq: %08x, Sum: %04x",
p->name, lsa.type, lsa.id, lsa.rt, lsa.age, lsa.sn, lsa.checksum);
}
void ospf_dump_common(struct proto *p, struct ospf_packet *op)
......@@ -561,8 +561,8 @@ ospf_lsupd_receive(struct ospf_packet *ps_i, struct ospf_iface *ifa,
lsatmp.sn = LSA_MAXSEQNO;
lsa->age = htons(LSA_MAXAGE);
lsa->sn = htonl(LSA_MAXSEQNO);
OSPF_TRACE(D_EVENTS, "Premature aging self originated lsa.");
OSPF_TRACE(D_EVENTS, "Type: %d, Id: %R, Rt: %R",
OSPF_TRACE(D_EVENTS, "Premature aging self originated LSA.");
OSPF_TRACE(D_EVENTS, "Type: %04x, Id: %R, Rt: %R",
lsatmp.type, lsatmp.id, lsatmp.rt);
lsasum_check(lsa, (lsa + 1)); /* It also calculates chsum! */
lsatmp.checksum = ntohs(lsa->checksum);
......@@ -715,6 +715,6 @@ ospf_lsupd_flush_nlsa(struct proto_ospf *po, struct top_hash_entry *en)
lsa->sn = LSA_MAXSEQNO;
lsasum_calculate(lsa, en->lsa_body);
OSPF_TRACE(D_EVENTS, "Premature aging self originated lsa!");
OSPF_TRACE(D_EVENTS, "Type: %d, Id: %R, Rt: %R", lsa->type, lsa->id, lsa->rt);
OSPF_TRACE(D_EVENTS, "Type: %04x, Id: %R, Rt: %R", lsa->type, lsa->id, lsa->rt);
ospf_lsupd_flood(po, NULL, NULL, lsa, en->domain, 0);
}
......@@ -117,9 +117,9 @@ ospf_start(struct proto *p)
struct ospf_area_config *ac;
struct ospf_area *oa;
po->router_id = proto_get_router_id(p->cf);
po->rfc1583 = c->rfc1583;
po->ebit = 0;
po->tick = c->tick;
po->disp_timer = tm_new(p->pool);
po->disp_timer->data = po;
......@@ -1527,15 +1527,15 @@ ospf_sh_lsadb(struct proto *p)
#endif
}
cli_msg(-1017, "");
cli_msg(-1017," Router ID LS ID Type Age Sequence Checksum");
cli_msg(-1017," Type LS ID Router Age Sequence Checksum");
last_dscope = dscope;
last_domain = hea[i]->domain;
}
cli_msg(-1017,"%-15R %-15R 0x%04x %5u 0x%08x 0x%04x",
lsa->rt, lsa->id, lsa->type, lsa->age, lsa->sn, lsa->checksum);
cli_msg(-1017," %04x %-15R %-15R %5u %08x %04x",
lsa->type, lsa->id, lsa->rt, lsa->age, lsa->sn, lsa->checksum);
}
cli_msg(0, "");
}
......
......@@ -868,8 +868,8 @@ ospf_ext_spf(struct proto_ospf *po)
if (pxlen < 0)
{
log("%s: Invalid mask in LSA. ID: %R, RT: %R, Type: %u",
p->name, en->lsa.id, en->lsa.rt, en->lsa.type);
log(L_WARN "%s: Invalid mask in LSA (Type: %04x, Id: %R, Rt: %R)",
p->name, en->lsa.type, en->lsa.id, en->lsa.rt);
continue;
}
nhi = NULL;
......
......@@ -472,7 +472,6 @@ static void *
originate_net_lsa_body(struct ospf_iface *ifa, u16 *length,
struct proto_ospf *po)
{
u32 rid = proto_get_router_id(po->proto.cf);
u16 i = 1;
struct ospf_neighbor *n;
struct ospf_lsa_net *net;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment