diff options
| -rw-r--r-- | bgpd/bgp_advertise.c | 2 | ||||
| -rw-r--r-- | bgpd/bgp_damp.c | 10 | ||||
| -rw-r--r-- | bgpd/bgp_dump.c | 2 | ||||
| -rw-r--r-- | bgpd/bgp_evpn.c | 8 | ||||
| -rw-r--r-- | bgpd/bgp_evpn_mh.c | 4 | ||||
| -rw-r--r-- | bgpd/bgp_fsm.c | 10 | ||||
| -rw-r--r-- | bgpd/bgp_io.c | 2 | ||||
| -rw-r--r-- | bgpd/bgp_mplsvpn.c | 2 | ||||
| -rw-r--r-- | bgpd/bgp_nexthop.c | 2 | ||||
| -rw-r--r-- | bgpd/bgp_nht.c | 4 | ||||
| -rw-r--r-- | bgpd/bgp_packet.c | 10 | ||||
| -rw-r--r-- | bgpd/bgp_route.c | 12 | ||||
| -rw-r--r-- | bgpd/bgp_snmp.c | 4 | ||||
| -rw-r--r-- | bgpd/bgp_updgrp.c | 4 | ||||
| -rw-r--r-- | bgpd/bgp_vty.c | 10 | ||||
| -rw-r--r-- | bgpd/bgpd.c | 17 | ||||
| -rw-r--r-- | bgpd/bgpd.h | 3 | ||||
| -rw-r--r-- | bgpd/rfapi/bgp_rfapi_cfg.c | 2 | ||||
| -rw-r--r-- | bgpd/rfapi/rfapi.c | 6 | ||||
| -rw-r--r-- | bgpd/rfapi/rfapi_rib.c | 6 | 
20 files changed, 54 insertions, 66 deletions
diff --git a/bgpd/bgp_advertise.c b/bgpd/bgp_advertise.c index cfbb29df1c..f62a54b03c 100644 --- a/bgpd/bgp_advertise.c +++ b/bgpd/bgp_advertise.c @@ -197,7 +197,7 @@ void bgp_adj_in_set(struct bgp_dest *dest, struct peer *peer, struct attr *attr,  	adj = XCALLOC(MTYPE_BGP_ADJ_IN, sizeof(struct bgp_adj_in));  	adj->peer = peer_lock(peer); /* adj_in peer reference */  	adj->attr = bgp_attr_intern(attr); -	adj->uptime = bgp_clock(); +	adj->uptime = monotime(NULL);  	adj->addpath_rx_id = addpath_id;  	BGP_ADJ_IN_ADD(dest, adj);  	bgp_dest_lock_node(dest); diff --git a/bgpd/bgp_damp.c b/bgpd/bgp_damp.c index 9acbaf7733..664619078a 100644 --- a/bgpd/bgp_damp.c +++ b/bgpd/bgp_damp.c @@ -125,7 +125,7 @@ static void bgp_reuse_timer(struct thread *t)  	thread_add_timer(bm->master, bgp_reuse_timer, bdc, DELTA_REUSE,  			 &bdc->t_reuse); -	t_now = bgp_clock(); +	t_now = monotime(NULL);  	/* 1.  save a pointer to the current zeroth queue head and zero the  	   list head entry.  */ @@ -189,7 +189,7 @@ int bgp_damp_withdraw(struct bgp_path_info *path, struct bgp_dest *dest,  	unsigned int last_penalty = 0;  	struct bgp_damp_config *bdc = &damp[afi][safi]; -	t_now = bgp_clock(); +	t_now = monotime(NULL);  	/* Processing Unreachable Messages.  */  	if (path->extra) @@ -273,7 +273,7 @@ int bgp_damp_update(struct bgp_path_info *path, struct bgp_dest *dest,  	if (!path->extra || !((bdi = path->extra->damp_info)))  		return BGP_DAMP_USED; -	t_now = bgp_clock(); +	t_now = monotime(NULL);  	bgp_path_info_unset_flag(dest, path, BGP_PATH_HISTORY);  	bdi->lastrecord = BGP_RECORD_UPDATE; @@ -588,7 +588,7 @@ void bgp_damp_info_vty(struct vty *vty, struct bgp_path_info *path, afi_t afi,  		return;  	/* Calculate new penalty.  */ -	t_now = bgp_clock(); +	t_now = monotime(NULL);  	t_diff = t_now - bdi->t_updated;  	penalty = bgp_damp_decay(t_diff, bdi->penalty, bdc); @@ -642,7 +642,7 @@ const char *bgp_damp_reuse_time_vty(struct vty *vty, struct bgp_path_info *path,  		return NULL;  	/* Calculate new penalty.  */ -	t_now = bgp_clock(); +	t_now = monotime(NULL);  	t_diff = t_now - bdi->t_updated;  	penalty = bgp_damp_decay(t_diff, bdi->penalty, bdc); diff --git a/bgpd/bgp_dump.c b/bgpd/bgp_dump.c index 720925b20f..9f64341640 100644 --- a/bgpd/bgp_dump.c +++ b/bgpd/bgp_dump.c @@ -367,7 +367,7 @@ bgp_dump_route_node_record(int afi, struct bgp_dest *dest,  		stream_putw(obuf, path->peer->table_dump_index);  		/* Originated */ -		stream_putl(obuf, time(NULL) - (bgp_clock() - path->uptime)); +		stream_putl(obuf, time(NULL) - (monotime(NULL) - path->uptime));  		/*Path Identifier*/  		if (addpath_capable) { diff --git a/bgpd/bgp_evpn.c b/bgpd/bgp_evpn.c index 0642c966eb..23b330c15d 100644 --- a/bgpd/bgp_evpn.c +++ b/bgpd/bgp_evpn.c @@ -1263,7 +1263,7 @@ static int update_evpn_type5_route_entry(struct bgp *bgp_evpn,  			/* Unintern existing, set to new. */  			bgp_attr_unintern(&tmp_pi->attr);  			tmp_pi->attr = attr_new; -			tmp_pi->uptime = bgp_clock(); +			tmp_pi->uptime = monotime(NULL);  		}  	}  	return 0; @@ -1626,7 +1626,7 @@ static int update_evpn_route_entry(struct bgp *bgp, struct bgpevpn *vpn,  			/* Unintern existing, set to new. */  			bgp_attr_unintern(&tmp_pi->attr);  			tmp_pi->attr = attr_new; -			tmp_pi->uptime = bgp_clock(); +			tmp_pi->uptime = monotime(NULL);  		}  	} @@ -2520,7 +2520,7 @@ static int install_evpn_route_entry_in_vrf(struct bgp *bgp_vrf,  		/* Unintern existing, set to new. */  		bgp_attr_unintern(&pi->attr);  		pi->attr = attr_new; -		pi->uptime = bgp_clock(); +		pi->uptime = monotime(NULL);  	}  	/* Gateway IP nexthop should be resolved */ @@ -2643,7 +2643,7 @@ static int install_evpn_route_entry(struct bgp *bgp, struct bgpevpn *vpn,  		/* Unintern existing, set to new. */  		bgp_attr_unintern(&pi->attr);  		pi->attr = attr_new; -		pi->uptime = bgp_clock(); +		pi->uptime = monotime(NULL);  	}  	/* Add this route to remote IP hashtable */ diff --git a/bgpd/bgp_evpn_mh.c b/bgpd/bgp_evpn_mh.c index 3f801f7ea0..95a0c31b55 100644 --- a/bgpd/bgp_evpn_mh.c +++ b/bgpd/bgp_evpn_mh.c @@ -233,7 +233,7 @@ static int bgp_evpn_es_route_install(struct bgp *bgp,  		/* Unintern existing, set to new. */  		bgp_attr_unintern(&pi->attr);  		pi->attr = attr_new; -		pi->uptime = bgp_clock(); +		pi->uptime = monotime(NULL);  	}  	/* Perform route selection and update zebra, if required. */ @@ -432,7 +432,7 @@ int bgp_evpn_mh_route_update(struct bgp *bgp, struct bgp_evpn_es *es,  			/* Unintern existing, set to new. */  			bgp_attr_unintern(&tmp_pi->attr);  			tmp_pi->attr = attr_new; -			tmp_pi->uptime = bgp_clock(); +			tmp_pi->uptime = monotime(NULL);  		}  	} diff --git a/bgpd/bgp_fsm.c b/bgpd/bgp_fsm.c index b570c84d8b..7b96555913 100644 --- a/bgpd/bgp_fsm.c +++ b/bgpd/bgp_fsm.c @@ -574,7 +574,7 @@ void bgp_routeadv_timer(struct thread *thread)  		zlog_debug("%s [FSM] Timer (routeadv timer expire)",  			   peer->host); -	peer->synctime = bgp_clock(); +	peer->synctime = monotime(NULL);  	thread_add_timer_msec(bm->master, bgp_generate_updgrp_packets, peer, 0,  			      &peer->t_generate_updgrp_packets); @@ -975,7 +975,7 @@ void bgp_start_routeadv(struct bgp *bgp)   */  void bgp_adjust_routeadv(struct peer *peer)  { -	time_t nowtime = bgp_clock(); +	time_t nowtime = monotime(NULL);  	double diff;  	unsigned long remain; @@ -987,7 +987,7 @@ void bgp_adjust_routeadv(struct peer *peer)  		 */  		THREAD_OFF(peer->t_routeadv); -		peer->synctime = bgp_clock(); +		peer->synctime = monotime(NULL);  		/* If suppress fib pending is enabled, route is advertised to  		 * peers when the status is received from the FIB. The delay  		 * is added to update group packet generate which will allow @@ -1471,7 +1471,7 @@ int bgp_stop(struct peer *peer)  		}  		/* set last reset time */ -		peer->resettime = peer->uptime = bgp_clock(); +		peer->resettime = peer->uptime = monotime(NULL);  		if (BGP_DEBUG(update_groups, UPDATE_GROUPS))  			zlog_debug("%s remove from all update group", @@ -2220,7 +2220,7 @@ static int bgp_establish(struct peer *peer)  	if (!peer->v_holdtime)  		bgp_keepalives_on(peer); -	peer->uptime = bgp_clock(); +	peer->uptime = monotime(NULL);  	/* Send route-refresh when ORF is enabled.  	 * Stop Long-lived Graceful Restart timers. diff --git a/bgpd/bgp_io.c b/bgpd/bgp_io.c index aba28fa504..7af1fae280 100644 --- a/bgpd/bgp_io.c +++ b/bgpd/bgp_io.c @@ -431,7 +431,7 @@ static uint16_t bgp_write(struct peer *peer)  	}  done : { -	now = bgp_clock(); +	now = monotime(NULL);  	/*  	 * Update last_update if UPDATEs were written.  	 * Note: that these are only updated at end, diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c index 7b8f0df2e2..e99c2ba661 100644 --- a/bgpd/bgp_mplsvpn.c +++ b/bgpd/bgp_mplsvpn.c @@ -925,7 +925,7 @@ leak_update(struct bgp *to_bgp, struct bgp_dest *bn,  			bgp_aggregate_decrement(to_bgp, p, bpi, afi, safi);  		bgp_attr_unintern(&bpi->attr);  		bpi->attr = new_attr; -		bpi->uptime = bgp_clock(); +		bpi->uptime = monotime(NULL);  		/*  		 * rewrite labels diff --git a/bgpd/bgp_nexthop.c b/bgpd/bgp_nexthop.c index e1fcc743ec..d42f2e669d 100644 --- a/bgpd/bgp_nexthop.c +++ b/bgpd/bgp_nexthop.c @@ -868,7 +868,7 @@ static void bgp_show_nexthop(struct vty *vty, struct bgp *bgp,  		if (!CHECK_FLAG(bnc->flags, BGP_NEXTHOP_REGISTERED))  			vty_out(vty, "  Is not Registered\n");  	} -	tbuf = time(NULL) - (bgp_clock() - bnc->last_update); +	tbuf = time(NULL) - (monotime(NULL) - bnc->last_update);  	vty_out(vty, "  Last update: %s", ctime(&tbuf));  	vty_out(vty, "\n"); diff --git a/bgpd/bgp_nht.c b/bgpd/bgp_nht.c index 344608fda1..c12c12b192 100644 --- a/bgpd/bgp_nht.c +++ b/bgpd/bgp_nht.c @@ -436,7 +436,7 @@ static void bgp_process_nexthop_update(struct bgp_nexthop_cache *bnc,  	int i;  	bool evpn_resolved = false; -	bnc->last_update = bgp_clock(); +	bnc->last_update = monotime(NULL);  	bnc->change_flags = 0;  	/* debug print the input */ @@ -609,7 +609,7 @@ static void bgp_nht_ifp_table_handle(struct bgp *bgp,  		if (bnc->ifindex != ifp->ifindex)  			continue; -		bnc->last_update = bgp_clock(); +		bnc->last_update = monotime(NULL);  		bnc->change_flags = 0;  		/* diff --git a/bgpd/bgp_packet.c b/bgpd/bgp_packet.c index fe1887565e..7daac44946 100644 --- a/bgpd/bgp_packet.c +++ b/bgpd/bgp_packet.c @@ -131,11 +131,11 @@ static void bgp_packet_add(struct peer *peer, struct stream *s)  		 * after it'll get confused  		 */  		if (!stream_fifo_count_safe(peer->obuf)) -			peer->last_sendq_ok = bgp_clock(); +			peer->last_sendq_ok = monotime(NULL);  		stream_fifo_push(peer->obuf, s); -		delta = bgp_clock() - peer->last_sendq_ok; +		delta = monotime(NULL) - peer->last_sendq_ok;  		holdtime = atomic_load_explicit(&peer->holdtime,  						memory_order_relaxed); @@ -156,12 +156,12 @@ static void bgp_packet_add(struct peer *peer, struct stream *s)  				peer->host);  			BGP_EVENT_ADD(peer, TCP_fatal_error);  		} else if (delta > (intmax_t)holdtime && -			   bgp_clock() - peer->last_sendq_warn > 5) { +			   monotime(NULL) - peer->last_sendq_warn > 5) {  			flog_warn(  				EC_BGP_SENDQ_STUCK_WARN,  				"%s has not made any SendQ progress for 1 holdtime, peer overloaded?",  				peer->host); -			peer->last_sendq_warn = bgp_clock(); +			peer->last_sendq_warn = monotime(NULL);  		}  	}  } @@ -2026,7 +2026,7 @@ static int bgp_update_receive(struct peer *peer, bgp_size_t size)  	   interned in bgp_attr_parse(). */  	bgp_attr_unintern_sub(&attr); -	peer->update_time = bgp_clock(); +	peer->update_time = monotime(NULL);  	/* Notify BGP Conditional advertisement scanner process */  	peer->advmap_table_change = true; diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 04f955f97a..85540627b0 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -3672,7 +3672,7 @@ struct bgp_path_info *info_make(int type, int sub_type, unsigned short instance,  	new->sub_type = sub_type;  	new->peer = peer;  	new->attr = attr; -	new->uptime = bgp_clock(); +	new->uptime = monotime(NULL);  	new->net = dest;  	return new;  } @@ -4062,7 +4062,7 @@ int bgp_update(struct peer *peer, const struct prefix *p, uint32_t addpath_id,  	/* If the update is implicit withdraw. */  	if (pi) { -		pi->uptime = bgp_clock(); +		pi->uptime = monotime(NULL);  		same_attr = attrhash_cmp(pi->attr, attr_new);  		hook_call(bgp_process, bgp, afi, safi, dest, peer, true); @@ -5995,7 +5995,7 @@ void bgp_static_update(struct bgp *bgp, const struct prefix *p,  #endif  			bgp_attr_unintern(&pi->attr);  			pi->attr = attr_new; -			pi->uptime = bgp_clock(); +			pi->uptime = monotime(NULL);  #ifdef ENABLE_BGP_VNC  			if ((afi == AFI_IP || afi == AFI_IP6)  			    && (safi == SAFI_UNICAST)) { @@ -6297,7 +6297,7 @@ static void bgp_static_update_safi(struct bgp *bgp, const struct prefix *p,  				bgp_aggregate_decrement(bgp, p, pi, afi, safi);  			bgp_attr_unintern(&pi->attr);  			pi->attr = attr_new; -			pi->uptime = bgp_clock(); +			pi->uptime = monotime(NULL);  #ifdef ENABLE_BGP_VNC  			if (pi->extra)  				label = decode_label(&pi->extra->label[0]); @@ -8521,7 +8521,7 @@ void bgp_redistribute_add(struct bgp *bgp, struct prefix *p,  						bgp, p, bpi, afi, SAFI_UNICAST);  				bgp_attr_unintern(&bpi->attr);  				bpi->attr = new_attr; -				bpi->uptime = bgp_clock(); +				bpi->uptime = monotime(NULL);  				/* Process change. */  				bgp_aggregate_increment(bgp, p, bpi, afi, @@ -10808,7 +10808,7 @@ void route_vty_out_detail(struct vty *vty, struct bgp *bgp, struct bgp_dest *bn,  	}  	/* Line 9 display Uptime */ -	tbuf = time(NULL) - (bgp_clock() - path->uptime); +	tbuf = time(NULL) - (monotime(NULL) - path->uptime);  	if (json_paths) {  		json_last_update = json_object_new_object();  		json_object_int_add(json_last_update, "epoch", tbuf); diff --git a/bgpd/bgp_snmp.c b/bgpd/bgp_snmp.c index e25d8d90db..6bc313464a 100644 --- a/bgpd/bgp_snmp.c +++ b/bgpd/bgp_snmp.c @@ -588,7 +588,7 @@ static uint8_t *bgpPeerTable(struct variable *v, oid name[], size_t *length,  		if (peer->uptime == 0)  			return SNMP_INTEGER(0);  		else -			return SNMP_INTEGER(bgp_clock() - peer->uptime); +			return SNMP_INTEGER(monotime(NULL) - peer->uptime);  	case BGPPEERCONNECTRETRYINTERVAL:  		*write_method = write_bgpPeerTable;  		return SNMP_INTEGER(peer->v_connect); @@ -615,7 +615,7 @@ static uint8_t *bgpPeerTable(struct variable *v, oid name[], size_t *length,  		if (peer->update_time == 0)  			return SNMP_INTEGER(0);  		else -			return SNMP_INTEGER(bgp_clock() - peer->update_time); +			return SNMP_INTEGER(monotime(NULL) - peer->update_time);  	default:  		return NULL;  	} diff --git a/bgpd/bgp_updgrp.c b/bgpd/bgp_updgrp.c index f1173941a0..3a974910fa 100644 --- a/bgpd/bgp_updgrp.c +++ b/bgpd/bgp_updgrp.c @@ -70,14 +70,14 @@  static void update_group_checkin(struct update_group *updgrp)  {  	updgrp->id = ++bm->updgrp_idspace; -	updgrp->uptime = bgp_clock(); +	updgrp->uptime = monotime(NULL);  }  static void update_subgroup_checkin(struct update_subgroup *subgrp,  				    struct update_group *updgrp)  {  	subgrp->id = ++bm->subgrp_idspace; -	subgrp->uptime = bgp_clock(); +	subgrp->uptime = monotime(NULL);  }  static void sync_init(struct update_subgroup *subgrp, diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c index 0eba5ea447..3fdff899c9 100644 --- a/bgpd/bgp_vty.c +++ b/bgpd/bgp_vty.c @@ -12723,7 +12723,7 @@ static void bgp_show_peer(struct vty *vty, struct peer *p, bool use_json,  		if (peer_established(p)) {  			time_t uptime; -			uptime = bgp_clock(); +			uptime = monotime(NULL);  			uptime -= p->uptime;  			epoch_tbuf = time(NULL) - uptime; @@ -12751,7 +12751,7 @@ static void bgp_show_peer(struct vty *vty, struct peer *p, bool use_json,  		time_t uptime;  		struct tm tm; -		uptime = bgp_clock(); +		uptime = monotime(NULL);  		uptime -= p->readtime;  		gmtime_r(&uptime, &tm); @@ -12759,7 +12759,7 @@ static void bgp_show_peer(struct vty *vty, struct peer *p, bool use_json,  				    (tm.tm_sec * 1000) + (tm.tm_min * 60000)  					    + (tm.tm_hour * 3600000)); -		uptime = bgp_clock(); +		uptime = monotime(NULL);  		uptime -= p->last_write;  		gmtime_r(&uptime, &tm); @@ -12767,7 +12767,7 @@ static void bgp_show_peer(struct vty *vty, struct peer *p, bool use_json,  				    (tm.tm_sec * 1000) + (tm.tm_min * 60000)  					    + (tm.tm_hour * 3600000)); -		uptime = bgp_clock(); +		uptime = monotime(NULL);  		uptime -= p->update_time;  		gmtime_r(&uptime, &tm); @@ -14039,7 +14039,7 @@ static void bgp_show_peer(struct vty *vty, struct peer *p, bool use_json,  			time_t uptime;  			struct tm tm; -			uptime = bgp_clock(); +			uptime = monotime(NULL);  			uptime -= p->resettime;  			gmtime_r(&uptime, &tm); diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index c17bd76ad7..247c8c5f58 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -531,17 +531,6 @@ void bgp_cluster_id_unset(struct bgp *bgp)  	}  } -/* time_t value that is monotonicly increasing - * and uneffected by adjustments to system clock - */ -time_t bgp_clock(void) -{ -	struct timeval tv; - -	monotime(&tv); -	return tv.tv_sec; -} -  /* BGP timer configuration.  */  void bgp_timers_set(struct bgp *bgp, uint32_t keepalive, uint32_t holdtime,  		    uint32_t connect_retry, uint32_t delayopen) @@ -1760,7 +1749,7 @@ struct peer *peer_create(union sockunion *su, const char *conf_if,  	}  	/* Last read and reset time set */ -	peer->readtime = peer->resettime = bgp_clock(); +	peer->readtime = peer->resettime = monotime(NULL);  	/* Default TTL set. */  	peer->ttl = (peer->sort == BGP_PEER_IBGP) ? MAXTTL : BGP_DEFAULT_TTL; @@ -7960,7 +7949,7 @@ char *peer_uptime(time_t uptime2, char *buf, size_t len, bool use_json,  	}  	/* Get current time. */ -	uptime1 = bgp_clock(); +	uptime1 = monotime(NULL);  	uptime1 -= uptime2;  	gmtime_r(&uptime1, &tm); @@ -8002,7 +7991,7 @@ void bgp_master_init(struct thread_master *master, const int buffer_size,  	bm->port = BGP_PORT_DEFAULT;  	bm->addresses = addresses;  	bm->master = master; -	bm->start_time = bgp_clock(); +	bm->start_time = monotime(NULL);  	bm->t_rmap_update = NULL;  	bm->rmap_update_timer = RMAP_DEFAULT_UPDATE_TIMER;  	bm->v_update_delay = BGP_UPDATE_DELAY_DEF; diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h index 8348b37b8e..dc7ad32a50 100644 --- a/bgpd/bgpd.h +++ b/bgpd/bgpd.h @@ -2043,7 +2043,6 @@ extern unsigned int multipath_num;  /* Prototypes. */  extern void bgp_terminate(void);  extern void bgp_reset(void); -extern time_t bgp_clock(void);  extern void bgp_zclient_reset(void);  extern struct bgp *bgp_get_default(void);  extern struct bgp *bgp_lookup(as_t, const char *); @@ -2449,7 +2448,7 @@ static inline int peer_group_af_configured(struct peer_group *group)  static inline char *timestamp_string(time_t ts)  {  	time_t tbuf; -	tbuf = time(NULL) - (bgp_clock() - ts); +	tbuf = time(NULL) - (monotime(NULL) - ts);  	return ctime(&tbuf);  } diff --git a/bgpd/rfapi/bgp_rfapi_cfg.c b/bgpd/rfapi/bgp_rfapi_cfg.c index 2437bd8cfe..831f92996a 100644 --- a/bgpd/rfapi/bgp_rfapi_cfg.c +++ b/bgpd/rfapi/bgp_rfapi_cfg.c @@ -94,7 +94,7 @@ DEFINE_QOBJ_TYPE(rfapi_l2_group_cfg);   */  time_t rfapi_time(time_t *t)  { -	time_t clock = bgp_clock(); +	time_t clock = monotime(NULL);  	if (t)  		*t = clock;  	return clock; diff --git a/bgpd/rfapi/rfapi.c b/bgpd/rfapi/rfapi.c index 382886e0bd..d10ed0774d 100644 --- a/bgpd/rfapi/rfapi.c +++ b/bgpd/rfapi/rfapi.c @@ -1006,7 +1006,7 @@ void add_vnc_route(struct rfapi_descriptor *rfd, /* cookie, VPN UN addr, peer */  				bgp_aggregate_decrement(bgp, p, bpi, afi, safi);  			bgp_attr_unintern(&bpi->attr);  			bpi->attr = new_attr; -			bpi->uptime = bgp_clock(); +			bpi->uptime = monotime(NULL);  			if (safi == SAFI_MPLS_VPN) { @@ -1523,8 +1523,8 @@ rfapi_query_inner(void *handle, struct rfapi_ip_addr *target,  	rfd->rsp_counter++;		  /* dedup: identify this generation */  	rfd->rsp_time = rfapi_time(NULL); /* response content dedup */  	rfd->ftd_last_allowed_time = -		bgp_clock() -		- bgp->rfapi_cfg->rfp_cfg.ftd_advertisement_interval; +		monotime(NULL) - +		bgp->rfapi_cfg->rfp_cfg.ftd_advertisement_interval;  	if (l2o) {  		if (!memcmp(l2o->macaddr.octet, rfapi_ethaddr0.octet, diff --git a/bgpd/rfapi/rfapi_rib.c b/bgpd/rfapi/rfapi_rib.c index 9d61ada7db..ffcd365579 100644 --- a/bgpd/rfapi/rfapi_rib.c +++ b/bgpd/rfapi/rfapi_rib.c @@ -797,7 +797,7 @@ int rfapiRibPreloadBi(  	 * Update last sent time for prefix  	 */  	trn = agg_node_get(rfd->rsp_times[afi], p); /* locks trn */ -	trn->info = (void *)(uintptr_t)bgp_clock(); +	trn->info = (void *)(uintptr_t)monotime(NULL);  	if (agg_node_get_lock_count(trn) > 1)  		agg_unlock_node(trn); @@ -1227,7 +1227,7 @@ callback:  			 */  			trn = agg_node_get(rfd->rsp_times[afi],  					   p); /* locks trn */ -			trn->info = (void *)(uintptr_t)bgp_clock(); +			trn->info = (void *)(uintptr_t)monotime(NULL);  			if (agg_node_get_lock_count(trn) > 1)  				agg_unlock_node(trn); @@ -2042,7 +2042,7 @@ rfapiRibPreload(struct bgp *bgp, struct rfapi_descriptor *rfd,  		 * update this NVE's timestamp for this prefix  		 */  		trn = agg_node_get(rfd->rsp_times[afi], &pfx); /* locks trn */ -		trn->info = (void *)(uintptr_t)bgp_clock(); +		trn->info = (void *)(uintptr_t)monotime(NULL);  		if (agg_node_get_lock_count(trn) > 1)  			agg_unlock_node(trn);  | 
