Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <d2b8da74-9b8f-3a49-abf4-ffbe88c04a30@googlemail.com>
Date: Thu, 1 Dec 2022 12:24:47 +0100
From: Gregor Jasny <gjasny@...glemail.com>
To: musl@...ts.openwall.com
Subject: Prefer monotonic clock for DNS lookup timeouts

Hello,

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;
}

http://git.musl-libc.org/cgit/musl/tree/src/network/res_msend.c#n28

Is this a bug or intentional?

Thanks,
Gregor

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.