summaryrefslogtreecommitdiffstats
path: root/proto/ospf/lsupd.c
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2000-05-03 00:31:48 +0200
committerOndrej Filip <feela@network.cz>2000-05-03 00:31:48 +0200
commit249fdef7a10ce507bd224ad9be48a86f09d8f21c (patch)
treed3bdc1e86bfdc616b571df560429d42247fb1d1f /proto/ospf/lsupd.c
parentc45f48fba5a0904f9c3512c3b42c38183fef348b (diff)
downloadbird-249fdef7a10ce507bd224ad9be48a86f09d8f21c.tar
bird-249fdef7a10ce507bd224ad9be48a86f09d8f21c.zip
Adding InfTransDelay for outgoing lsa.
Diffstat (limited to 'proto/ospf/lsupd.c')
-rw-r--r--proto/ospf/lsupd.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/proto/ospf/lsupd.c b/proto/ospf/lsupd.c
index 3390abb..b372a21 100644
--- a/proto/ospf/lsupd.c
+++ b/proto/ospf/lsupd.c
@@ -105,9 +105,16 @@ flood_lsa(struct ospf_neighbor *n, struct ospf_lsa_header *hn,
{
u8 *help;
struct top_hash_entry *en;
- htonlsah(hh,(struct ospf_lsa_header *)(pk+1));
- help=(u8 *)(pk+1);
- help+=sizeof(struct ospf_lsa_header);
+ struct ospf_lsa_header *lh;
+ u16 age;
+
+ lh=(struct ospf_lsa_header *)(pk+1);
+ htonlsah(hh,lh);
+ age=hh->age;
+ age+=ifa->inftransdelay;
+ if(age>LSA_MAXAGE) age=LSA_MAXAGE;
+ lh->age=htons(age);
+ help=(u8 *)(lh+1);
en=ospf_hash_find_header(oa->gr,hh);
htonlsab(en->lsa_body,help,hh->type,hh->length);
len=hh->length;