0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 17:51:53 +00:00

Better dumping.

This commit is contained in:
Ondrej Filip 2000-05-10 12:22:00 +00:00
parent 5e50f0a028
commit 353f326138

View File

@ -150,7 +150,7 @@ rxmt_timer_hook(timer *timer)
ifa=n->ifa; ifa=n->ifa;
p=(struct proto *)(ifa->proto); p=(struct proto *)(ifa->proto);
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->rid); p->name, ifa->iface->name, n->ip);
if(n->state<NEIGHBOR_LOADING) ospf_dbdes_tx(n); if(n->state<NEIGHBOR_LOADING) ospf_dbdes_tx(n);
else else
{ {
@ -216,16 +216,18 @@ ospf_dbdes_rx(struct ospf_dbdes_packet *ps, struct proto *p,
if(ifa->iface->mtu<size) if(ifa->iface->mtu<size)
{ {
debug("%s: Received dbdes larger than MTU from (%I)!\n", p->name, nrid); debug("%s: Received dbdes larger than MTU from %I!\n", p->name, n->ip);
return ; return ;
} }
debug("%s: Received dbdes from %I.\n", p->name, n->ip);
switch(n->state) switch(n->state)
{ {
case NEIGHBOR_DOWN: case NEIGHBOR_DOWN:
case NEIGHBOR_ATTEMPT: case NEIGHBOR_ATTEMPT:
case NEIGHBOR_2WAY: case NEIGHBOR_2WAY:
debug("%s: Received dbdes from %I in bad state.\n", p->name, nrid); debug("%s: Received dbdes from %I in bad state.\n", p->name, n->ip);
return; return;
break; break;
case NEIGHBOR_INIT: case NEIGHBOR_INIT:
@ -242,7 +244,7 @@ ospf_dbdes_rx(struct ospf_dbdes_packet *ps, struct proto *p,
n->options=ps->options; n->options=ps->options;
n->myimms.bit.ms=0; n->myimms.bit.ms=0;
n->imms.byte=ps->imms.byte; n->imms.byte=ps->imms.byte;
debug("%s: I'm slave to %I. \n", p->name, nrid); debug("%s: I'm slave to %I. \n", p->name, n->ip);
ospf_neigh_sm(n, INM_NEGDONE); ospf_neigh_sm(n, INM_NEGDONE);
tm_stop(n->rxmt_timer); tm_stop(n->rxmt_timer);
ospf_dbdes_tx(n); ospf_dbdes_tx(n);
@ -262,7 +264,7 @@ ospf_dbdes_rx(struct ospf_dbdes_packet *ps, struct proto *p,
} }
else else
{ {
DBG("%s: Nothing happend to %I (imms=%u)\n", p->name, nrid, DBG("%s: Nothing happend to %I (imms=%u)\n", p->name, n->ip,
ps->imms.byte); ps->imms.byte);
break; break;
} }
@ -272,7 +274,7 @@ ospf_dbdes_rx(struct ospf_dbdes_packet *ps, struct proto *p,
(ntohl(ps->ddseq)==n->ddr)) (ntohl(ps->ddseq)==n->ddr))
{ {
/* Duplicate packet */ /* Duplicate packet */
debug("%s: Received duplicate dbdes from (%I)!\n", p->name, nrid); debug("%s: Received duplicate dbdes from %I!\n", p->name, n->ip);
if(n->imms.bit.ms==0) if(n->imms.bit.ms==0)
{ {
ospf_dbdes_tx(n); ospf_dbdes_tx(n);
@ -346,7 +348,7 @@ ospf_dbdes_rx(struct ospf_dbdes_packet *ps, struct proto *p,
if((ps->imms.byte==n->imms.byte) && (ps->options=n->options) && if((ps->imms.byte==n->imms.byte) && (ps->options=n->options) &&
(ps->ddseq==n->dds)) /* Only duplicate are accepted */ (ps->ddseq==n->dds)) /* Only duplicate are accepted */
{ {
debug("%s: Received duplicate dbdes from (%I)!\n", p->name, nrid); debug("%s: Received duplicate dbdes from %I!\n", p->name, n->ip);
return; return;
} }
else else
@ -355,7 +357,7 @@ ospf_dbdes_rx(struct ospf_dbdes_packet *ps, struct proto *p,
} }
break; break;
defaut: defaut:
die("%s: Received dbdes from %I in unknown state.\n", p->name, nrid); die("%s: Received dbdes from %I in unknown state.\n", p->name, n->ip);
break; break;
} }
} }