summaryrefslogtreecommitdiff
path: root/proto/ospf
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2000-05-31 15:51:39 +0000
committerOndrej Filip <feela@network.cz>2000-05-31 15:51:39 +0000
commit31ee3d5f214666a4b2da328dc894a5a9089acc87 (patch)
treefb12c2e9c7e5caf782f95a067bda998972efee7a /proto/ospf
parenta9eeefd63ab7886bc2a5b8f0f7a2d1ec69a9c831 (diff)
Another step to make premature aging better.
Diffstat (limited to 'proto/ospf')
-rw-r--r--proto/ospf/lsupd.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/proto/ospf/lsupd.c b/proto/ospf/lsupd.c
index 04849b33..19a663b8 100644
--- a/proto/ospf/lsupd.c
+++ b/proto/ospf/lsupd.c
@@ -358,11 +358,16 @@ ospf_lsupd_rx(struct ospf_lsupd_packet *ps, struct proto *p,
{
struct top_hash_entry *en;
- lsa->age=(htons(LSA_MAXAGE));
lsatmp.age=LSA_MAXAGE;
+ lsatmp.sn=LSA_MAXSEQNO;
debug("%s: Premature aging self originated lsa.\n",p->name);
debug("%s: Type: %d, Id: %I, Rt: %I\n", p->name, lsatmp.type,
lsatmp.id, lsatmp.rt);
+ body=mb_alloc(p->pool,lsatmp.length-sizeof(struct ospf_lsa_header));
+ ntohlsab(lsa+1,body,lsatmp.type,
+ lsatmp.length-sizeof(struct ospf_lsa_header));
+ lsasum_check(lsa,(lsa+1),po);
+ lsatmp.checksum=ntohs(lsa->checksum);
flood_lsa(NULL,lsa,&lsatmp,po,NULL,oa,0);
if(en=ospf_hash_find_header(oa->gr,&lsatmp))
{
@@ -465,6 +470,8 @@ net_flush_lsa(struct top_hash_entry *en, struct proto_ospf *po,
struct ospf_lsa_header *lsa=&en->lsa;
lsa->age=LSA_MAXAGE;
+ lsa->sn=LSA_MAXSEQNO;
+ lsasum_calculate(lsa,en->lsa_body,po);
debug("%s: Premature aging self originated lsa!\n",po->proto.name);
debug("%s: Type: %d, Id: %I, Rt: %I\n", po->proto.name, lsa->type,
lsa->id, lsa->rt);