diff options
author | Ondrej Filip <feela@network.cz> | 2000-03-29 00:34:28 +0000 |
---|---|---|
committer | Ondrej Filip <feela@network.cz> | 2000-03-29 00:34:28 +0000 |
commit | 963ea03d872db30e1a0d0216e488b1960590af2d (patch) | |
tree | 852ec072e4451d39d0884539d697d923c0e438cb /proto/ospf/topology.c | |
parent | d0031c5ee94b29b7a5419a0504c160e424d970b0 (diff) |
DBdes sending/receiving changes.
Diffstat (limited to 'proto/ospf/topology.c')
-rw-r--r-- | proto/ospf/topology.c | 11 |
1 files changed, 9 insertions, 2 deletions
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); } |