diff options
author | Ondrej Filip <feela@network.cz> | 2000-05-02 22:31:48 +0000 |
---|---|---|
committer | Ondrej Filip <feela@network.cz> | 2000-05-02 22:31:48 +0000 |
commit | 249fdef7a10ce507bd224ad9be48a86f09d8f21c (patch) | |
tree | d3bdc1e86bfdc616b571df560429d42247fb1d1f /proto/ospf/lsupd.c | |
parent | c45f48fba5a0904f9c3512c3b42c38183fef348b (diff) |
Adding InfTransDelay for outgoing lsa.
Diffstat (limited to 'proto/ospf/lsupd.c')
-rw-r--r-- | proto/ospf/lsupd.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/proto/ospf/lsupd.c b/proto/ospf/lsupd.c index 3390abb4..b372a219 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; |