summaryrefslogtreecommitdiffstats
path: root/proto/ospf/topology.c
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2000-03-29 02:34:28 +0200
committerOndrej Filip <feela@network.cz>2000-03-29 02:34:28 +0200
commit963ea03d872db30e1a0d0216e488b1960590af2d (patch)
tree852ec072e4451d39d0884539d697d923c0e438cb /proto/ospf/topology.c
parentd0031c5ee94b29b7a5419a0504c160e424d970b0 (diff)
downloadbird-963ea03d872db30e1a0d0216e488b1960590af2d.tar
bird-963ea03d872db30e1a0d0216e488b1960590af2d.zip
DBdes sending/receiving changes.
Diffstat (limited to 'proto/ospf/topology.c')
-rw-r--r--proto/ospf/topology.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/proto/ospf/topology.c b/proto/ospf/topology.c
index ae49228..fe236ba 100644
--- a/proto/ospf/topology.c
+++ b/proto/ospf/topology.c
@@ -174,6 +174,8 @@ addifa_rtlsa(struct ospf_iface *ifa)
if(oa==NULL) /* New area */
{
+ struct ospf_lsa_header *lsa;
+
oa=po->firstarea;
po->firstarea=mb_alloc(po->proto.pool, sizeof(struct ospf_area));
po->firstarea->next=oa;
@@ -183,9 +185,14 @@ addifa_rtlsa(struct ospf_iface *ifa)
s_init_list(&(oa->lsal));
oa->rt=ospf_hash_get(oa->gr, rtid, rtid, LSA_T_RT);
s_add_head(&(oa->lsal), (snode *)oa->rt);
+ ((snode *)oa->rt)->next=NULL;
+ lsa=&(oa->rt->lsa);
oa->rt->lsa_body=NULL;
- oa->rt->lsa.age=0;
- oa->rt->lsa.sn=LSA_INITSEQNO-1; /* FIXME Check it latter */
+ lsa->age=0;
+ lsa->sn=LSA_INITSEQNO-1; /* FIXME Check it latter */
+ lsa->checksum=0;
+ lsa->checksum=ipsum_calculate(lsa,sizeof(struct ospf_lsa_header),NULL);
+ ifa->oa=oa;
DBG("%s: New OSPF area \"%d\" added.\n", po->proto.name, ifa->an);
}