From 30147b89ff3a389ad40096505f3d1a5ba1705736 Mon Sep 17 00:00:00 2001 From: Ondrej Filip Date: Wed, 8 Mar 2000 12:50:28 +0000 Subject: Sending of DBDes. (Checksum and length calculation NOT done.) --- proto/ospf/topology.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'proto/ospf/topology.c') diff --git a/proto/ospf/topology.c b/proto/ospf/topology.c index 1f86014..ad88f01 100644 --- a/proto/ospf/topology.c +++ b/proto/ospf/topology.c @@ -38,9 +38,11 @@ addifa_rtlsa(struct ospf_iface *ifa) while(oa!=NULL) { - if(oa->areaid==ifa->area) break; + if(oa->areaid==ifa->an) break; oa=oa->next; } + + ifa->oa=oa; if(oa==NULL) /* New area */ { @@ -48,12 +50,13 @@ addifa_rtlsa(struct ospf_iface *ifa) po->firstarea=mb_alloc(po->proto.pool, sizeof(struct ospf_area)); po->firstarea->next=oa; oa=po->firstarea; - oa->areaid=ifa->area; + oa->areaid=ifa->an; oa->gr=ospf_top_new(po); + s_init_list(&(oa->lsal)); oa->rtlinks=sl_new(po->proto.pool, sizeof(struct top_graph_rtlsa_link)); oa->rt=ospf_hash_get(oa->gr, rtid, rtid, LSA_T_RT); - DBG("XXXXXX %x XXXXXXX\n", oa->rt); + s_add_head(&(oa->lsal), (snode *)oa->rt); rt=mb_alloc(po->proto.pool, sizeof(struct top_graph_rtlsa)); oa->rt->vertex=(void *)rt; oa->rt->lsage=0; @@ -61,7 +64,7 @@ addifa_rtlsa(struct ospf_iface *ifa) rt->Vbit=0; rt->Ebit= (po->areano++ ? 0 : 1); /* If it's 1st area set 0 */ rt->Bbit=0; /* FIXME Could read config */ - DBG("%s: New OSPF area \"%d\" added.\n", po->proto.name, ifa->area); + DBG("%s: New OSPF area \"%d\" added.\n", po->proto.name, ifa->an); if(po->areano==2) /* We are attached to more than 2 areas! */ { -- cgit v1.2.3