summaryrefslogtreecommitdiff
path: root/proto/ospf/dbdes.c
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2000-03-29 12:45:37 +0000
committerOndrej Filip <feela@network.cz>2000-03-29 12:45:37 +0000
commit96501dfe5f6fd7a2837aee910c78f147e54e4f0b (patch)
tree9e41eb87cdb0537b7bd824f45e0da6d90dfffbfa /proto/ospf/dbdes.c
parent04c6319a630e9e18bc45da5e5b1c1f11d726c261 (diff)
Sending of DBdes bug fixed.
Diffstat (limited to 'proto/ospf/dbdes.c')
-rw-r--r--proto/ospf/dbdes.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/proto/ospf/dbdes.c b/proto/ospf/dbdes.c
index 7ee40da2..079865a1 100644
--- a/proto/ospf/dbdes.c
+++ b/proto/ospf/dbdes.c
@@ -52,6 +52,7 @@ 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);
@@ -67,6 +68,7 @@ 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))))
{
@@ -112,15 +114,17 @@ ospf_dbdes_tx(struct ospf_neighbor *n)
DBG("Number of LSA NOT sent: %d\n", i);
DBG("M bit unset.\n");
n->myimms.bit.m=0; /* Unset more bit */
+ DBG("Ini: %d, M: %d MS: %d.\n",n->imms.bit.i, n->imms.bit.m, n->imms.bit.ms);
}
s_put(&(n->dbsi),sn);
- pkt->imms=n->myimms;
+ pkt->imms.byte=n->myimms.byte;
length=(j-i)*sizeof(struct ospf_lsa_header)+
sizeof(struct ospf_dbdes_packet);
op->length=htons(length);
+
ospf_pkt_finalize(ifa, op);
}
@@ -131,7 +135,7 @@ ospf_dbdes_tx(struct ospf_neighbor *n)
for(i=0; i<ifa->iface->mtu; i++)
{
- *(bb+i)=*(aa+i); /* Copy last sent packet again */
+ *(aa+i)=*(bb+i); /* Copy last sent packet again */
}
{