summaryrefslogtreecommitdiffstats
path: root/proto/ospf/dbdes.c
diff options
context:
space:
mode:
Diffstat (limited to 'proto/ospf/dbdes.c')
-rw-r--r--proto/ospf/dbdes.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/proto/ospf/dbdes.c b/proto/ospf/dbdes.c
index 4e0f2a4..9236da7 100644
--- a/proto/ospf/dbdes.c
+++ b/proto/ospf/dbdes.c
@@ -234,15 +234,19 @@ ospf_dbdes_reqladd(struct ospf_dbdes_packet *ps, struct proto *p,
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+i, &(sn->lsa));
- s_add_tail(&(n->lsrql), SNODE sn);
- }
+ 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))
+ {
+ /* Is this confition necessary? */
+ if(ospf_hash_find(n->lsrqh,lsa.id,lsa.rt,lsa.type)==NULL)
+ {
+ sn=ospf_hash_get(n->lsrqh,lsa.id,lsa.rt,lsa.type);
+ ntohlsah(plsa+i, &(sn->lsa));
+ s_add_tail(&(n->lsrql), SNODE sn);
+ }
+ }
}
}