mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 01:31:55 +00:00
Some fixes and update of OSPF debug messages
This commit is contained in:
parent
0e9617e400
commit
23d6702952
@ -148,7 +148,7 @@ ospf_dbdes_send(struct ospf_neighbor *n)
|
|||||||
OSPF_TRACE(D_PACKETS, "DB_DES (M) sent to %I via %s.", n->ip,
|
OSPF_TRACE(D_PACKETS, "DB_DES (M) sent to %I via %s.", n->ip,
|
||||||
ifa->iface->name);
|
ifa->iface->name);
|
||||||
|
|
||||||
DBG("DB_DES PS=%u, M=%u.", ntohl(pkt->ddseq), pkt->imms.bit.m);
|
DBG("DB_DES PS=%u, M=%u\n", ntohl(pkt->ddseq), pkt->imms.bit.m);
|
||||||
|
|
||||||
if (!n->myimms.bit.ms)
|
if (!n->myimms.bit.ms)
|
||||||
{
|
{
|
||||||
@ -210,7 +210,7 @@ ospf_dbdes_receive(struct ospf_dbdes_packet *ps,
|
|||||||
OSPF_TRACE(D_PACKETS, "Received dbdes from %I via %s.", n->ip,
|
OSPF_TRACE(D_PACKETS, "Received dbdes from %I via %s.", n->ip,
|
||||||
ifa->iface->name);
|
ifa->iface->name);
|
||||||
|
|
||||||
DBG("DB_DES PS=%u, M=%u SIZE=%u.", ntohl(ps->ddseq), ps->imms.bit.m, size);
|
DBG("DB_DES PS=%u, M=%u SIZE=%u\n", ntohl(ps->ddseq), ps->imms.bit.m, size);
|
||||||
|
|
||||||
ospf_neigh_sm(n, INM_HELLOREC);
|
ospf_neigh_sm(n, INM_HELLOREC);
|
||||||
|
|
||||||
@ -349,7 +349,7 @@ ospf_dbdes_receive(struct ospf_dbdes_packet *ps,
|
|||||||
{
|
{
|
||||||
OSPF_TRACE(D_PACKETS, "dbdes - sequence mismatch neighbor %I (full)",
|
OSPF_TRACE(D_PACKETS, "dbdes - sequence mismatch neighbor %I (full)",
|
||||||
n->ip);
|
n->ip);
|
||||||
DBG("PS=%u, DDR=%u, DDS=%u", ntohl(ps->ddseq), n->ddr, n->dds);
|
DBG("PS=%u, DDR=%u, DDS=%u\n", ntohl(ps->ddseq), n->ddr, n->dds);
|
||||||
ospf_neigh_sm(n, INM_SEQMIS);
|
ospf_neigh_sm(n, INM_SEQMIS);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -230,7 +230,7 @@ ospf_iface_sm(struct ospf_iface *ifa, int event)
|
|||||||
{
|
{
|
||||||
struct ospf_area *oa = ifa->oa;
|
struct ospf_area *oa = ifa->oa;
|
||||||
|
|
||||||
DBG("SM on iface %s. Event is \"%s\".", ifa->iface->name, ospf_ism[event]);
|
DBG("SM on iface %s. Event is '%s'\n", ifa->iface->name, ospf_ism[event]);
|
||||||
|
|
||||||
switch (event)
|
switch (event)
|
||||||
{
|
{
|
||||||
|
@ -45,8 +45,8 @@ ospf_lsreq_send(struct ospf_neighbor *n)
|
|||||||
lsh->type = en->lsa.type;
|
lsh->type = en->lsa.type;
|
||||||
lsh->rt = htonl(en->lsa.rt);
|
lsh->rt = htonl(en->lsa.rt);
|
||||||
lsh->id = htonl(en->lsa.id);
|
lsh->id = htonl(en->lsa.id);
|
||||||
DBG("Requesting %uth LSA: Type: %u, Id: %I, RT: %I\n", i, en->lsa.type,
|
DBG("Requesting %uth LSA: Type: %u, ID: %I, RT: %I, SN: 0x%x, Age %u\n",
|
||||||
en->lsa.id, en->lsa.rt);
|
i, en->lsa.type, en->lsa.id, en->lsa.rt, en->lsa.sn, en->lsa.age);
|
||||||
lsh++;
|
lsh++;
|
||||||
if (sn == STAIL(n->lsrql))
|
if (sn == STAIL(n->lsrql))
|
||||||
break;
|
break;
|
||||||
@ -93,7 +93,7 @@ ospf_lsreq_receive(struct ospf_lsreq_packet *ps,
|
|||||||
{
|
{
|
||||||
u32 hid = ntohl(lsh->id);
|
u32 hid = ntohl(lsh->id);
|
||||||
u32 hrt = ntohl(lsh->rt);
|
u32 hrt = ntohl(lsh->rt);
|
||||||
DBG("Processing LSA: ID=%I, Type=%u, Router=%I\n", hid, lsh->type, hrt);
|
DBG("Processing requested LSA: Type: %u, ID: %I, RT: %I\n", lsh->type, hid, hrt);
|
||||||
llsh = sl_alloc(upslab);
|
llsh = sl_alloc(upslab);
|
||||||
llsh->lsh.id = hid;
|
llsh->lsh.id = hid;
|
||||||
llsh->lsh.rt = hrt;
|
llsh->lsh.rt = hrt;
|
||||||
@ -103,8 +103,8 @@ ospf_lsreq_receive(struct ospf_lsreq_packet *ps,
|
|||||||
llsh->lsh.type) == NULL)
|
llsh->lsh.type) == NULL)
|
||||||
{
|
{
|
||||||
log(L_WARN
|
log(L_WARN
|
||||||
"Received bad LS req from: %I looking: RT: %I, ID: %I, Type: %u",
|
"Received bad LS req from: %I looking: Type: %u, ID: %I, RT: %I",
|
||||||
n->ip, hrt, hid, lsh->type);
|
n->ip, lsh->type, hid, hrt);
|
||||||
ospf_neigh_sm(n, INM_BADLSREQ);
|
ospf_neigh_sm(n, INM_BADLSREQ);
|
||||||
rfree(upslab);
|
rfree(upslab);
|
||||||
return;
|
return;
|
||||||
|
@ -50,6 +50,10 @@ ospf_lsupd_flood(struct ospf_neighbor *n, struct ospf_lsa_header *hn,
|
|||||||
if (ifa->oa != oa)
|
if (ifa->oa != oa)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DBG("Wanted to flood LSA: Type: %u, ID: %I, RT: %I, SN: 0x%x, Age %u\n",
|
||||||
|
hh->type, hh->id, hh->rt, hh->sn, hh->age);
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
WALK_LIST(nn, ifa->neigh_list)
|
WALK_LIST(nn, ifa->neigh_list)
|
||||||
{
|
{
|
||||||
@ -59,6 +63,8 @@ ospf_lsupd_flood(struct ospf_neighbor *n, struct ospf_lsa_header *hn,
|
|||||||
{
|
{
|
||||||
if ((en = ospf_hash_find_header(nn->lsrqh, nn->ifa->oa->areaid, hh)) != NULL)
|
if ((en = ospf_hash_find_header(nn->lsrqh, nn->ifa->oa->areaid, hh)) != NULL)
|
||||||
{
|
{
|
||||||
|
DBG("That LSA found in lsreq list for neigh %I\n", nn->rid);
|
||||||
|
|
||||||
switch (lsa_comp(hh, &en->lsa))
|
switch (lsa_comp(hh, &en->lsa))
|
||||||
{
|
{
|
||||||
case CMP_OLDER:
|
case CMP_OLDER:
|
||||||
@ -106,8 +112,7 @@ ospf_lsupd_flood(struct ospf_neighbor *n, struct ospf_lsa_header *hn,
|
|||||||
}
|
}
|
||||||
s_add_tail(&nn->lsrtl, SNODE en);
|
s_add_tail(&nn->lsrtl, SNODE en);
|
||||||
memcpy(&en->lsa, hh, sizeof(struct ospf_lsa_header));
|
memcpy(&en->lsa, hh, sizeof(struct ospf_lsa_header));
|
||||||
DBG("Adding LSA lsrt RT: %I, Id: %I, Type: %u for n: %I\n",
|
DBG("Adding that LSA for flood to %I\n", nn->ip);
|
||||||
en->lsa.rt, en->lsa.id, en->lsa.type, nn->ip);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -245,8 +250,8 @@ ospf_lsupd_send_list(struct ospf_neighbor *n, list * l)
|
|||||||
continue; /* Probably flushed LSA */
|
continue; /* Probably flushed LSA */
|
||||||
/* FIXME This is a bug! I cannot flush LSA that is in lsrt */
|
/* FIXME This is a bug! I cannot flush LSA that is in lsrt */
|
||||||
|
|
||||||
DBG("Sending ID=%I, Type=%u, RT=%I Sn: 0x%x Age: %u\n",
|
DBG("Sending LSA: Type=%u, ID=%I, RT=%I, SN: 0x%x, Age: %u\n",
|
||||||
llsh->lsh.id, llsh->lsh.type, llsh->lsh.rt, en->lsa.sn, en->lsa.age);
|
llsh->lsh.type, llsh->lsh.id, llsh->lsh.rt, en->lsa.sn, en->lsa.age);
|
||||||
if (((u32) (len + en->lsa.length)) > ospf_pkt_maxsize(n->ifa))
|
if (((u32) (len + en->lsa.length)) > ospf_pkt_maxsize(n->ifa))
|
||||||
{
|
{
|
||||||
pk->lsano = htonl(lsano);
|
pk->lsano = htonl(lsano);
|
||||||
|
@ -293,7 +293,7 @@ ospf_neigh_sm(struct ospf_neighbor *n, int event)
|
|||||||
struct proto_ospf *po = n->ifa->oa->po;
|
struct proto_ospf *po = n->ifa->oa->po;
|
||||||
struct proto *p = &po->proto;
|
struct proto *p = &po->proto;
|
||||||
|
|
||||||
DBG("Neighbor state machine for neighbor %I, event \"%s\".", n->ip,
|
DBG("Neighbor state machine for neighbor %I, event '%s'\n", n->ip,
|
||||||
ospf_inm[event]);
|
ospf_inm[event]);
|
||||||
|
|
||||||
switch (event)
|
switch (event)
|
||||||
@ -600,10 +600,11 @@ void
|
|||||||
rxmt_timer_hook(timer * timer)
|
rxmt_timer_hook(timer * timer)
|
||||||
{
|
{
|
||||||
struct ospf_neighbor *n = (struct ospf_neighbor *) timer->data;
|
struct ospf_neighbor *n = (struct ospf_neighbor *) timer->data;
|
||||||
|
struct proto *p = &n->ifa->oa->po->proto;
|
||||||
struct top_hash_entry *en;
|
struct top_hash_entry *en;
|
||||||
|
|
||||||
DBG("%s: RXMT timer fired on interface %s for neigh: %I.\n",
|
DBG("%s: RXMT timer fired on interface %s for neigh: %I.\n",
|
||||||
p->name, ifa->iface->name, n->ip);
|
p->name, n->ifa->iface->name, n->ip);
|
||||||
|
|
||||||
if(n->state < NEIGHBOR_EXSTART) return;
|
if(n->state < NEIGHBOR_EXSTART) return;
|
||||||
|
|
||||||
|
@ -539,9 +539,9 @@ check_sum_lsa(struct proto_ospf *po, ort *nf, int dest)
|
|||||||
if ((nf->n.type > RTS_OSPF_IA) && (nf->o.type > RTS_OSPF_IA)) return;
|
if ((nf->n.type > RTS_OSPF_IA) && (nf->o.type > RTS_OSPF_IA)) return;
|
||||||
|
|
||||||
#ifdef LOCAL_DEBUG
|
#ifdef LOCAL_DEBUG
|
||||||
DBG("Checking...dest = %d, %I/%d", dest, nf->fn.prefix, nf->fn.pxlen);
|
DBG("Checking...dest = %d, %I/%d\n", dest, nf->fn.prefix, nf->fn.pxlen);
|
||||||
if (nf->n.oa) DBG("New: met=%d, oa=%d", nf->n.metric1, nf->n.oa->areaid);
|
if (nf->n.oa) DBG("New: met=%d, oa=%d\n", nf->n.metric1, nf->n.oa->areaid);
|
||||||
if (nf->o.oa) DBG("Old: met=%d, oa=%d", nf->o.metric1, nf->o.oa->areaid);
|
if (nf->o.oa) DBG("Old: met=%d, oa=%d\n", nf->o.metric1, nf->o.oa->areaid);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
WALK_LIST(oa, po->area_list)
|
WALK_LIST(oa, po->area_list)
|
||||||
|
Loading…
Reference in New Issue
Block a user