diff options
author | Ondrej Filip <feela@network.cz> | 2000-03-30 20:18:51 +0000 |
---|---|---|
committer | Ondrej Filip <feela@network.cz> | 2000-03-30 20:18:51 +0000 |
commit | 14a7921c83f0ecfc8793b3a38e4ac16ae9bd75d3 (patch) | |
tree | db11a7775c5bf5469d8f2bca8702ac84dca158cb /proto/ospf/topology.c | |
parent | de769e24c01ff0c4aa573d9b4cec833dcae182d2 (diff) |
LSA structure changes. (Len added.)
Diffstat (limited to 'proto/ospf/topology.c')
-rw-r--r-- | proto/ospf/topology.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/proto/ospf/topology.c b/proto/ospf/topology.c index 15163f93..6bbc5e70 100644 --- a/proto/ospf/topology.c +++ b/proto/ospf/topology.c @@ -23,7 +23,7 @@ #define HASH_LO_STEP 2 #define HASH_LO_MIN 8 -void +unsigned int make_rt_lsa(struct ospf_area *oa, struct proto_ospf *p) { struct ospf_iface *ifa; @@ -147,17 +147,16 @@ make_rt_lsa(struct ospf_area *oa, struct proto_ospf *p) rt->links=i; if(old->lsa_body!=NULL) mb_free(old->lsa_body); old->lsa_body=rt; + return rt->links*sizeof(struct ospf_lsa_rt_link)+sizeof(struct ospf_lsa_rt); } - void addifa_rtlsa(struct ospf_iface *ifa) { struct ospf_area *oa; struct proto_ospf *po; u32 rtid; - struct top_hash_entry *rt; struct top_graph_rtlsa_link *li, *lih; po=ifa->proto; @@ -196,8 +195,7 @@ addifa_rtlsa(struct ospf_iface *ifa) DBG("%s: New OSPF area \"%d\" added.\n", po->proto.name, ifa->an); } - make_rt_lsa(oa, po); - /* FIXME length? */ + oa->rt->body_len=make_rt_lsa(oa, po); /*FIXME seq no++ */ /*FIXME lsa_flood(oa->rt) */ } |