diff options
Diffstat (limited to 'ospfd/ospf_flood.c')
| -rw-r--r-- | ospfd/ospf_flood.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ospfd/ospf_flood.c b/ospfd/ospf_flood.c index 7f83ddeaae..417a7aa8d2 100644 --- a/ospfd/ospf_flood.c +++ b/ospfd/ospf_flood.c @@ -22,6 +22,7 @@ #include <zebra.h> +#include "monotime.h" #include "linklist.h" #include "prefix.h" #include "if.h" @@ -277,8 +278,8 @@ ospf_flood (struct ospf *ospf, struct ospf_neighbor *nbr, "while local one is initial instance."); ; /* Accept this LSA for quick LSDB resynchronization. */ } - else if (tv_cmp (tv_sub (recent_relative_time (), current->tv_recv), - msec2tv (ospf->min_ls_arrival)) < 0) + else if (monotime_since (¤t->tv_recv, NULL) + < ospf->min_ls_arrival * 1000LL) { if (IS_DEBUG_OSPF_EVENT) zlog_debug ("LSA[Flooding]: LSA is received recently."); @@ -969,7 +970,7 @@ ospf_lsa_flush_area (struct ospf_lsa *lsa, struct ospf_area *area) more time for the ACK to be received and avoid retransmissions */ lsa->data->ls_age = htons (OSPF_LSA_MAXAGE); - lsa->tv_recv = recent_relative_time (); + monotime(&lsa->tv_recv); lsa->tv_orig = lsa->tv_recv; ospf_flood_through_area (area, NULL, lsa); ospf_lsa_maxage (area->ospf, lsa); @@ -982,7 +983,7 @@ ospf_lsa_flush_as (struct ospf *ospf, struct ospf_lsa *lsa) more time for the ACK to be received and avoid retransmissions */ lsa->data->ls_age = htons (OSPF_LSA_MAXAGE); - lsa->tv_recv = recent_relative_time (); + monotime(&lsa->tv_recv); lsa->tv_orig = lsa->tv_recv; ospf_flood_through_as (ospf, NULL, lsa); ospf_lsa_maxage (ospf, lsa); |
