From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 18581 invoked from network); 1 Dec 2022 14:02:48 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 1 Dec 2022 14:02:48 -0000 Received: (qmail 7754 invoked by uid 550); 1 Dec 2022 14:02:42 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 17808 invoked from network); 1 Dec 2022 11:25:00 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; h=content-transfer-encoding:subject:from:to:content-language :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=iVBsHUXMz88osI8nTMrD+0ossSXi+3d1p2asjwfCtXo=; b=Vm3OfAseHpTiyeTeh7A9vkoDA5QY0jBGMNxVAO2rlkIwp32H1hnBkcWVjRrxDk+tDB dRpUHPhYmy6hZCbfSLG+5uoB0RzPvL4iDcUZOhiE/8XcOVbA74O4p0yJlzKAOxXBVle+ cA6uj5N+9xbqQIczLFKwO4WY0ucjRpNWsfL36p57lTgb3F2IPAGzTsS49IhrZqEnKZFP MS8cndYtG2zjiG8IROtSUHZEDR6DCDTQ6HY+XhGdkxd/2uo6v2Id7B/HQW84SMvOic5K gFtr71fCVqqYIUcFxfMRSgCjdo+CJYQz7/PVVyn3qsepZrNnufLgxoidyj6xQsmTl/VR D6PA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:subject:from:to:content-language :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=iVBsHUXMz88osI8nTMrD+0ossSXi+3d1p2asjwfCtXo=; b=0oJmBjQO8BfM8m4c/NU9FxdBJpUaCMbtAeoMYTQOfdbaRzLHoeJiabWLaUqPDrQaLw q7+n3YKiDq5ZLeI1GA9rZeZSyLhBO3WRHlRDZ8zt6cFc5MiRI6U/JIfMN4QJ3myW3KbX 0NraiEE4UOJPuAe1n0u3xF4ygWxW9vuj5D5PtrZ+8NtinqVCbZpO2+MI+Y+b98hKCjyY MrS/VSc0TQ2hYjGnxQgd5vpOdp8hDTcA1iOofRyXwdgeJnzdmVSHbTmpe76c5ctysl2D uj0yZSpfNAfXW/aEPmmm9qECtkRtH4/so3Vt5AftyhdSontKH4TH39ekAUJJT1T+iFXc pi7Q== X-Gm-Message-State: ANoB5pnPcNtHO861nCZt6eZRZZWDd4rTBRkh7zVgReN/Vl9Kx6BGjMR4 nHlFEv9sKRaxwQxNPqcEpW4sx+fb4t4= X-Google-Smtp-Source: AA0mqf7YADUjI5MTNb3CwUQc3gdavWTu1TEc4Ixx1I2lXwGM8xeQbF8eBDKPN9tZrCps+dT59s7lWw== X-Received: by 2002:a5d:4149:0:b0:242:149c:5690 with SMTP id c9-20020a5d4149000000b00242149c5690mr12812325wrq.491.1669893888906; Thu, 01 Dec 2022 03:24:48 -0800 (PST) Message-ID: Date: Thu, 1 Dec 2022 12:24:47 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Content-Language: en-US To: musl@lists.openwall.com From: Gregor Jasny Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: [musl] 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