From 249fdef7a10ce507bd224ad9be48a86f09d8f21c Mon Sep 17 00:00:00 2001 From: Ondrej Filip Date: Tue, 2 May 2000 22:31:48 +0000 Subject: Adding InfTransDelay for outgoing lsa. --- proto/ospf/lsupd.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'proto/ospf/lsupd.c') 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; -- cgit v1.2.3