mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 13:35:08 -05:00
Fuzz transmit timestamp
Add random bits below clock precision to the timestamp to make it less predictable.
This commit is contained in:
4
util.h
4
util.h
@@ -88,8 +88,10 @@ extern char *UTI_TimeToLogForm(time_t t);
|
||||
/* Adjust time following a frequency/offset change */
|
||||
extern void UTI_AdjustTimeval(struct timeval *old_tv, struct timeval *when, struct timeval *new_tv, double *delta, double dfreq, double doffset);
|
||||
|
||||
/* Get a random value to fuzz an NTP timestamp in the given precision */
|
||||
extern uint32_t UTI_GetNTPTsFuzz(int precision);
|
||||
|
||||
extern void UTI_TimevalToInt64(struct timeval *src, NTP_int64 *dest);
|
||||
extern void UTI_TimevalToInt64(struct timeval *src, NTP_int64 *dest, uint32_t fuzz);
|
||||
|
||||
extern void UTI_Int64ToTimeval(NTP_int64 *src, struct timeval *dest);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user