summaryrefslogtreecommitdiff
path: root/proto/ospf/lsupd.c
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2004-06-04 16:30:04 +0000
committerOndrej Filip <feela@network.cz>2004-06-04 16:30:04 +0000
commitc76ba51a5fc7d61e18213f99d9c09502af0bc192 (patch)
treee778fef3a0fe4a169ba35f162733904e40756498 /proto/ospf/lsupd.c
parent28de5133ecdcb5b45dc251123047164fbb940e50 (diff)
lsack.c cleaned. Better names for functions and
DIRECT acks can be sent in one packet now.
Diffstat (limited to 'proto/ospf/lsupd.c')
-rw-r--r--proto/ospf/lsupd.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/proto/ospf/lsupd.c b/proto/ospf/lsupd.c
index 39a089dc..f56974c9 100644
--- a/proto/ospf/lsupd.c
+++ b/proto/ospf/lsupd.c
@@ -366,7 +366,7 @@ ospf_lsupd_rx(struct ospf_lsupd_packet *ps, struct proto *p,
/* pg 143 (4) */
if((lsatmp.age==LSA_MAXAGE)&&(lsadb==NULL)&&can_flush_lsa(oa))
{
- ospf_lsack_direct_tx(n,lsa);
+ ospf_lsack_enqueue(n, lsa, p, ACKL_DIRECT);
continue;
}
@@ -399,7 +399,7 @@ ospf_lsupd_rx(struct ospf_lsupd_packet *ps, struct proto *p,
if((lsatmp.age==LSA_MAXAGE)&&(lsatmp.sn==LSA_MAXSEQNO))
{
- ospf_lsack_direct_tx(n,lsa);
+ ospf_lsack_enqueue(n, lsa, p, ACKL_DIRECT);
continue;
}
@@ -432,9 +432,9 @@ ospf_lsupd_rx(struct ospf_lsupd_packet *ps, struct proto *p,
DBG("Wasn't flooded back\n"); /* ps 144(5e), pg 153 */
if(ifa->state==OSPF_IS_BACKUP)
{
- if(ifa->drid==n->rid) ospf_lsa_delay(n, lsa, p);
+ if(ifa->drid==n->rid) ospf_lsack_enqueue(n, lsa, p, ACKL_DELAY);
}
- else ospf_lsa_delay(n, lsa, p);
+ else ospf_lsack_enqueue(n, lsa, p, ACKL_DELAY);
}
/* Remove old from all ret lists */
@@ -488,13 +488,13 @@ ospf_lsupd_rx(struct ospf_lsupd_packet *ps, struct proto *p,
ospf_hash_delete(n->lsrth, en);
if(ifa->state==OSPF_IS_BACKUP)
{
- if(n->rid==ifa->drid) ospf_lsa_delay(n, lsa, p);
+ if(n->rid==ifa->drid) ospf_lsack_enqueue(n, lsa, p, ACKL_DELAY);
}
}
else
{
/* pg145 (7b) */
- ospf_lsack_direct_tx(n,lsa);
+ ospf_lsack_enqueue(n, lsa, p, ACKL_DIRECT);
}
continue;
}
@@ -517,6 +517,9 @@ ospf_lsupd_rx(struct ospf_lsupd_packet *ps, struct proto *p,
}
}
+ /* Send direct LSAs */
+ ospf_lsack_send(n, ACKL_DIRECT);
+
if(n->state==NEIGHBOR_LOADING)
{
ospf_lsreq_tx(n); /* Send me another part of database */