mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 23:54:45 +00:00
[ospf6d] Fix regression in monotonic time patch - LSA max-aging broke
* ospf6_lsa.c: (ospf6_lsa_premature_aging) set age to MAX_AGE - don't rely on 0 magically meaning same. (ospf6_lsa_age_current) handle MAXAGE.
This commit is contained in:
parent
41b2373cec
commit
9b4ef258a9
@ -207,6 +207,12 @@ ospf6_lsa_age_current (struct ospf6_lsa *lsa)
|
|||||||
zlog_warn ("LSA: quagga_gettime failed, may fail LSA AGEs: %s",
|
zlog_warn ("LSA: quagga_gettime failed, may fail LSA AGEs: %s",
|
||||||
safe_strerror (errno));
|
safe_strerror (errno));
|
||||||
|
|
||||||
|
if (lsa->header->age >= htons (MAXAGE))
|
||||||
|
{
|
||||||
|
/* LSA may have been prematurely aged */
|
||||||
|
lsa->header->age = htons (MAXAGE);
|
||||||
|
return MAXAGE;
|
||||||
|
}
|
||||||
/* calculate age */
|
/* calculate age */
|
||||||
ulage = now.tv_sec - lsa->birth.tv_sec;
|
ulage = now.tv_sec - lsa->birth.tv_sec;
|
||||||
|
|
||||||
@ -239,7 +245,12 @@ ospf6_lsa_premature_aging (struct ospf6_lsa *lsa)
|
|||||||
THREAD_OFF (lsa->expire);
|
THREAD_OFF (lsa->expire);
|
||||||
THREAD_OFF (lsa->refresh);
|
THREAD_OFF (lsa->refresh);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The below technique to age out LSA does not work when using relative time
|
||||||
|
*
|
||||||
memset (&lsa->birth, 0, sizeof (struct timeval));
|
memset (&lsa->birth, 0, sizeof (struct timeval));
|
||||||
|
*/
|
||||||
|
lsa->header->age = htons (MAXAGE);
|
||||||
thread_execute (master, ospf6_lsa_expire, lsa, 0);
|
thread_execute (master, ospf6_lsa_expire, lsa, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user