summaryrefslogtreecommitdiffstats
path: root/proto/ospf
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2000-04-18 19:00:56 +0200
committerOndrej Filip <feela@network.cz>2000-04-18 19:00:56 +0200
commit023f5e86eba76a79dd90d5a4546ae8b200ccf023 (patch)
tree34d86c7c7d28833530d871fdc7383064d37fa24b /proto/ospf
parent67315ef64e3655c65cfab032d637fe29d3cf91b2 (diff)
downloadbird-023f5e86eba76a79dd90d5a4546ae8b200ccf023.tar
bird-023f5e86eba76a79dd90d5a4546ae8b200ccf023.zip
Another LSack update. It's still NOT correct and it surely
kills gated or Cyclades OSPF implementation. :-)
Diffstat (limited to 'proto/ospf')
-rw-r--r--proto/ospf/lsack.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/proto/ospf/lsack.c b/proto/ospf/lsack.c
index 53346bc..1006cf6 100644
--- a/proto/ospf/lsack.c
+++ b/proto/ospf/lsack.c
@@ -17,6 +17,8 @@ ospf_lsack_direct_tx(struct ospf_neighbor *n,struct ospf_lsa_header *h)
sock *sk=n->ifa->ip_sk;
u16 len;
+ DBG("Sending direct ACK to %I\n",n->rid);
+
pk=(struct ospf_lsack_packet *)sk->tbuf;
op=(struct ospf_packet *)sk->tbuf;
@@ -38,7 +40,7 @@ ospf_lsa_delay(struct ospf_neighbor *n,struct ospf_lsa_header *h,
no=mb_alloc(p->pool,sizeof(struct lsah_n));
memcpy(&no->lsa,h,sizeof(struct ospf_lsa_header));
add_tail(&n->ackl, NODE no);
-
+ DBG("Adding delay ack for %I\n",n->rid);
}
void
@@ -59,6 +61,8 @@ ospf_lsack_delay_tx(struct ospf_neighbor *n)
struct lsah_n *no;
struct ospf_iface *ifa=n->ifa;
+ DBG("Sending delay ack to %I\n", n->rid);
+
if(ifa->type==OSPF_IT_BCAST)
{
sk=ifa->hello_sk;
@@ -79,8 +83,10 @@ ospf_lsack_delay_tx(struct ospf_neighbor *n)
no=(struct lsah_n *)HEAD(n->ackl);
memcpy(h+i,&no->lsa, sizeof(struct ospf_lsa_header));
i++;
- rem_node(NODE n);
- if((i*sizeof(struct ospf_lsa_header)+sizeof(struct ospf_lsack_packet)-SIPH)>
+ DBG("Iter %u ID: %I, RT: %I, Type: %u\n",i, ntohl((h+i)->id),
+ ntohl((h+i)->rt),(h+i)->type);
+ rem_node(NODE no);
+ if((i*sizeof(struct ospf_lsa_header)+sizeof(struct ospf_lsack_packet)+SIPH)>
n->ifa->iface->mtu)
{
if(!EMPTY_LIST(n->ackl))
@@ -88,6 +94,7 @@ ospf_lsack_delay_tx(struct ospf_neighbor *n)
len=sizeof(struct ospf_lsack_packet)+i*sizeof(struct ospf_lsa_header);
op->length=htons(len);
ospf_pkt_finalize(n->ifa, op);
+ DBG("Sending! Len=%u\n",len);
if(ifa->type==OSPF_IT_BCAST)
{
if((ifa->state==OSPF_IS_DR)||(ifa->state==OSPF_IS_BACKUP))
@@ -103,9 +110,7 @@ ospf_lsack_delay_tx(struct ospf_neighbor *n)
{
sk_send_to_agt(sk, len, ifa, NEIGHBOR_EXCHANGE);
}
-
fill_ospf_pkt_hdr(n->ifa, pk, LSUPD);
- h=(struct ospf_lsa_header *)(pk+1);
i=0;
}
}
@@ -114,6 +119,7 @@ ospf_lsack_delay_tx(struct ospf_neighbor *n)
len=sizeof(struct ospf_lsack_packet)+i*sizeof(struct ospf_lsa_header);
op->length=htons(len);
ospf_pkt_finalize(n->ifa, op);
+ DBG("Sending! Len=%u\n",len);
if(ifa->type==OSPF_IT_BCAST)
{
if((ifa->state==OSPF_IS_DR)||(ifa->state==OSPF_IS_BACKUP))