summaryrefslogtreecommitdiffstats
path: root/proto/ospf/dbdes.c
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2000-03-30 02:18:59 +0200
committerOndrej Filip <feela@network.cz>2000-03-30 02:18:59 +0200
commit6d2b32114feadb283cb988daa7ed80142aa8c4d1 (patch)
tree67274abcbca41d5c2b7f640f24f11d90f84c3749 /proto/ospf/dbdes.c
parent3ee2310c5dccebe2b63098ab478b5b1d61e4fcb2 (diff)
downloadbird-6d2b32114feadb283cb988daa7ed80142aa8c4d1.tar
bird-6d2b32114feadb283cb988daa7ed80142aa8c4d1.zip
LSreq initial work.
Diffstat (limited to 'proto/ospf/dbdes.c')
-rw-r--r--proto/ospf/dbdes.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/proto/ospf/dbdes.c b/proto/ospf/dbdes.c
index c6dabc5..4e0f2a4 100644
--- a/proto/ospf/dbdes.c
+++ b/proto/ospf/dbdes.c
@@ -184,7 +184,7 @@ rxmt_timer_hook(timer *timer)
n=(struct ospf_neighbor *)timer->data;
ifa=n->ifa;
p=(struct proto *)(ifa->proto);
- debug("%s: RXMT timer fired on interface %s for nigh: %d.\n",
+ debug("%s: RXMT timer fired on interface %s for neigh: %u.\n",
p->name, ifa->iface->name, n->rid);
if(n->state<NEIGHBOR_LOADING) ospf_dbdes_tx(n);
else
@@ -221,19 +221,29 @@ ospf_dbdes_reqladd(struct ospf_dbdes_packet *ps, struct proto *p,
struct ospf_lsa_header *plsa,lsa;
struct top_hash_entry *he,*sn;
struct top_graph *gr;
+ struct ospf_packet *op;
+ int i,j;
gr=n->ifa->oa->gr;
+ op=(struct ospf_packet *)ps;
plsa=(void *)(ps+1);
- ntohlsah(plsa, &lsa);
+
+ j=(ntohs(op->length)-sizeof(struct ospf_dbdes_packet))/
+ sizeof( struct ospf_lsa_header);
+
+ for(i=0;i<j;i++)
+ {
+ ntohlsah(plsa+i, &lsa);
/* FIXME Test Checksum */
if(((he=ospf_hash_find(gr,lsa.id,lsa.rt,lsa.type))==NULL)||
(lsa_comp(&lsa, &(he->lsa))==1))
{
sn=sl_alloc(gr->hash_slab);
- ntohlsah(plsa, &(sn->lsa));
+ ntohlsah(plsa+i, &(sn->lsa));
s_add_tail(&(n->lsrql), SNODE sn);
}
+ }
}
void