summaryrefslogtreecommitdiff
path: root/proto/ospf/neighbor.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/neighbor.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/neighbor.c')
-rw-r--r--proto/ospf/neighbor.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/proto/ospf/neighbor.c b/proto/ospf/neighbor.c
index e533eb68..eb777b7a 100644
--- a/proto/ospf/neighbor.c
+++ b/proto/ospf/neighbor.c
@@ -67,7 +67,8 @@ ospf_neighbor_new(struct ospf_iface *ifa)
n->ackd_timer->randomize = 0;
n->ackd_timer->hook = ackd_timer_hook;
n->ackd_timer->recurrent = ifa->rxmtint/2;
- init_list(&n->ackl);
+ init_list(&n->ackl[ACKL_DIRECT]);
+ init_list(&n->ackl[ACKL_DELAY]);
tm_start(n->ackd_timer,n->ifa->rxmtint/2);
DBG("%s: Installing ackd timer.\n", p->name);
@@ -306,10 +307,10 @@ ospf_neigh_sm(struct ospf_neighbor *n, int event)
{
neigh_chstate(n,NEIGHBOR_EXCHANGE);
s_init(&(n->dbsi), &(n->ifa->oa->lsal));
- while(!EMPTY_LIST(n->ackl))
+ while(!EMPTY_LIST(n->ackl[ACKL_DELAY]))
{
struct lsah_n *no;
- no=(struct lsah_n *)HEAD(n->ackl);
+ no=(struct lsah_n *)HEAD(n->ackl[ACKL_DELAY]);
rem_node(NODE no);
mb_free(no);
}
@@ -611,6 +612,6 @@ void
ackd_timer_hook(timer *t)
{
struct ospf_neighbor *n=t->data;
- if(!EMPTY_LIST(n->ackl)) ospf_lsack_delay_tx(n);
+ ospf_lsack_send(n, ACKL_DELAY);
}