From 9669362f0577dbda0d7b9495d0c2fec11fa866f1 Mon Sep 17 00:00:00 2001 From: Ondrej Filip Date: Tue, 9 May 2000 18:17:34 +0000 Subject: Many bugfixes. (I added one entry twice to slist.) Debug cleanup. Retransmiting of unacknolegded LSAs --- proto/ospf/lsack.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'proto/ospf/lsack.c') diff --git a/proto/ospf/lsack.c b/proto/ospf/lsack.c index 764df62..3479f3a 100644 --- a/proto/ospf/lsack.c +++ b/proto/ospf/lsack.c @@ -15,6 +15,7 @@ ospf_lsack_direct_tx(struct ospf_neighbor *n,struct ospf_lsa_header *h) struct ospf_packet *op; struct ospf_lsack_packet *pk; sock *sk=n->ifa->ip_sk; + struct proto *p=&n->ifa->proto->proto; u16 len; DBG("Sending direct ACK to %I for Type: %u, ID: %I, RT: %I\n",n->rid, @@ -30,6 +31,7 @@ ospf_lsack_direct_tx(struct ospf_neighbor *n,struct ospf_lsa_header *h) op->length=htons(len); ospf_pkt_finalize(n->ifa, op); sk_send_to(sk,len, n->ip, OSPF_PROTO); + debug("%s: LS ack sent to %I\n", p->name, n->ip); } void @@ -160,13 +162,16 @@ ospf_lsack_rx(struct ospf_lsack_packet *ps, struct proto *p, if((n=find_neigh(ifa, nrid))==NULL) { - debug("%s: Received lsack from unknown neigbor! (%I)\n", p->name, + debug("%s: Received LS ack from unknown neigbor! (%I)\n", p->name, nrid); return ; } if(n->statename, + n->ip); + nolsa=(ntohs(ps->ospf_packet.length)-sizeof(struct ospf_lsack_packet))/ sizeof(struct ospf_lsa_header); DBG("Received %d lsa ack(s)\n",nolsa); @@ -180,6 +185,9 @@ ospf_lsack_rx(struct ospf_lsack_packet *ps, struct proto *p, if(lsa_comp(&lsa,&en->lsa)!=CMP_SAME) { log("Strange LS acknoledgement from %I",n->rid); + log("Id: %I, Rt: %I, Type: %u",lsa.id, lsa.rt, lsa.type); + log("I have: Age: %u, Seqno: %u", en->lsa.age, en->lsa.sn); + log("He has: Age: %u, Seqno: %u", lsa.age, lsa.sn); continue; } -- cgit v1.2.3