0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-11-18 00:58:42 +00:00

Slave bug fix.

This commit is contained in:
Ondrej Filip 2000-03-29 17:51:40 +00:00
parent 910e557b47
commit 2560c8860e

View File

@ -89,7 +89,6 @@ ospf_dbdes_tx(struct ospf_neighbor *n)
if(n->myimms.bit.m) if(n->myimms.bit.m)
{ {
sn=s_get(&(n->dbsi)); sn=s_get(&(n->dbsi));
DBG("Number of LSA: %d\n", j); DBG("Number of LSA: %d\n", j);
@ -185,10 +184,14 @@ rxmt_timer_hook(timer *timer)
n=(struct ospf_neighbor *)timer->data; n=(struct ospf_neighbor *)timer->data;
ifa=n->ifa; ifa=n->ifa;
p=(struct proto *)(ifa->proto); p=(struct proto *)(ifa->proto);
debug("%s: RXMT timer fired on interface %s.\n", debug("%s: RXMT timer fired on interface %s for nigh: %d.\n",
p->name, ifa->iface->name); p->name, ifa->iface->name, n->rid);
if(n->state<NEIGHBOR_LOADING) ospf_dbdes_tx(n); if(n->state<NEIGHBOR_LOADING) ospf_dbdes_tx(n);
/* else FIXME I should dealloc ldbdes */ else
{
tm_stop(n->rxmt_timer);
/* FIXME I should dealloc ldbdes */
}
} }
int int
@ -336,6 +339,8 @@ ospf_dbdes_rx(struct ospf_dbdes_packet *ps, struct proto *p,
break; break;
} }
n->imms.byte=ps->imms.byte;
if(ps->options!=n->options) /* Options differs */ if(ps->options!=n->options) /* Options differs */
{ {
DBG("SEQMIS-OPT\n"); DBG("SEQMIS-OPT\n");
@ -366,13 +371,14 @@ ospf_dbdes_rx(struct ospf_dbdes_packet *ps, struct proto *p,
} }
else else
{ {
if(ps->ddseq!=(n->dds+1)) /* SLAVE */ if(ntohl(ps->ddseq)!=(n->dds+1)) /* SLAVE */
{ {
DBG("SEQMIS-SLAVE\n"); DBG("SEQMIS-SLAVE\n");
ospf_neigh_sm(n, INM_SEQMIS); ospf_neigh_sm(n, INM_SEQMIS);
break; break;
} }
n->ddr=ps->ddseq; n->ddr=ntohl(ps->ddseq);
n->dds=ntohl(ps->ddseq);
ospf_dbdes_reqladd(ps,p,n); ospf_dbdes_reqladd(ps,p,n);
ospf_dbdes_tx(n); ospf_dbdes_tx(n);
} }