Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Thu, 1 Dec 2022 12:24:47 +0100
From: Gregor Jasny <>
Subject: Prefer monotonic clock for DNS lookup timeouts


while looking for a reason for a failed DNS resolve I noticed that
the mtime function which is used to calculate and decide on the timeout 
uses the wall clock instead of a monotonic clock:

static unsigned long mtime()
	struct timespec ts;
	clock_gettime(CLOCK_REALTIME, &ts);
	return (unsigned long)ts.tv_sec * 1000
		+ ts.tv_nsec / 1000000;

Is this a bug or intentional?


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.