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;
}
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)
hid[i] = ntohl(nid[i]);
}
+/*
void
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 */
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
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);
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)
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);
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);
}
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;
#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, "");
}
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;
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;