summaryrefslogtreecommitdiffstats
path: root/proto
diff options
context:
space:
mode:
Diffstat (limited to 'proto')
-rw-r--r--proto/ospf/dbdes.c14
-rw-r--r--proto/ospf/neighbor.c7
2 files changed, 7 insertions, 14 deletions
diff --git a/proto/ospf/dbdes.c b/proto/ospf/dbdes.c
index 6d6c333..45241c3 100644
--- a/proto/ospf/dbdes.c
+++ b/proto/ospf/dbdes.c
@@ -39,7 +39,6 @@ ospf_dbdes_tx(struct ospf_neighbor *n)
switch(n->state)
{
case NEIGHBOR_EXSTART: /* Send empty packets */
- n->myimms.bit.i=1;
pkt=(struct ospf_dbdes_packet *)(ifa->ip_sk->tbuf);
op=(struct ospf_packet *)pkt;
fill_ospf_pkt_hdr(ifa, pkt, DBDES_P);
@@ -56,8 +55,6 @@ ospf_dbdes_tx(struct ospf_neighbor *n)
break;
case NEIGHBOR_EXCHANGE:
- n->myimms.bit.i=0;
-
if(((n->myimms.bit.ms) && (n->dds==n->ddr+1)) ||
((!(n->myimms.bit.ms)) && (n->dds==n->ddr)))
{
@@ -73,7 +70,7 @@ ospf_dbdes_tx(struct ospf_neighbor *n)
pkt->ddseq=htonl(n->dds);
j=i=(ifa->iface->mtu-sizeof(struct ospf_dbdes_packet)-SIPH)/
- sizeof(struct ospf_lsa_header); /* Number of lsaheaders */
+ sizeof(struct ospf_lsa_header); /* Number of possible lsaheaders to send */
lsa=(n->ldbdes+sizeof(struct ospf_dbdes_packet));
if(n->myimms.bit.m)
@@ -116,7 +113,7 @@ ospf_dbdes_tx(struct ospf_neighbor *n)
op->length=htons(length);
ospf_pkt_finalize(ifa, op);
- DBG("%s: DB_DES (M) sent to %I.\n", p->name, n->ip);
+ DBG("%s: DB_DES (M) prepared for %I.\n", p->name, n->ip);
}
case NEIGHBOR_LOADING:
@@ -142,7 +139,6 @@ ospf_dbdes_tx(struct ospf_neighbor *n)
{
ospf_neigh_sm(n, INM_EXDONE);
if(n->myimms.bit.ms) tm_stop(n->rxmt_timer);
- else tm_start(n->rxmt_timer,ifa->rxmtint);
}
}
break;
@@ -282,9 +278,9 @@ ospf_dbdes_rx(struct ospf_dbdes_packet *ps, struct proto *p,
break;
}
}
- if(ps->imms.bit.i) break;
+
case NEIGHBOR_EXCHANGE:
- if((ps->imms.byte==n->imms.byte) && (ps->options=n->options) &&
+ if((ps->imms.byte==n->imms.byte) && (ps->options==n->options) &&
(ntohl(ps->ddseq)==n->ddr))
{
/* Duplicate packet */
@@ -359,7 +355,7 @@ ospf_dbdes_rx(struct ospf_dbdes_packet *ps, struct proto *p,
break;
case NEIGHBOR_LOADING:
case NEIGHBOR_FULL:
- 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 */
{
OSPF_TRACE(D_PACKETS, "Received duplicate dbdes from %I.",n->ip);
diff --git a/proto/ospf/neighbor.c b/proto/ospf/neighbor.c
index bc4d1c3..d9c9b1b 100644
--- a/proto/ospf/neighbor.c
+++ b/proto/ospf/neighbor.c
@@ -67,11 +67,6 @@ neigh_chstate(struct ospf_neighbor *n, u8 state)
schedule_rt_lsa(ifa->oa);
schedule_net_lsa(ifa);
}
- if(oldstate>=NEIGHBOR_EXSTART && state<NEIGHBOR_EXSTART)
- {
- /* Stop RXMT timer */
- tm_stop(n->rxmt_timer);
- }
if(state==NEIGHBOR_EXSTART)
{
if(n->adj==0) /* First time adjacency */
@@ -86,6 +81,8 @@ neigh_chstate(struct ospf_neighbor *n, u8 state)
tm_start(n->rxmt_timer,1); /* Or some other number ? */
}
if(state<NEIGHBOR_EXCHANGE) tm_stop(n->lsrr_timer);
+ if(state<NEIGHBOR_EXSTART) tm_stop(n->rxmt_timer);
+ if(state>NEIGHBOR_EXSTART) n->myimms.bit.i=0;
}
}