From 963ea03d872db30e1a0d0216e488b1960590af2d Mon Sep 17 00:00:00 2001 From: Ondrej Filip Date: Wed, 29 Mar 2000 00:34:28 +0000 Subject: DBdes sending/receiving changes. --- proto/ospf/topology.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'proto/ospf/topology.c') diff --git a/proto/ospf/topology.c b/proto/ospf/topology.c index ae492282..fe236ba9 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); } -- cgit v1.2.3