Your message dated Thu, 10 Oct 2019 17:05:19 +0000 with message-id <E1iIbsN-0001sd-LB@fasolo.debian.org> and subject line Bug#523513: fixed in rdate 1:1.10-1 has caused the Debian Bug report #523513, regarding rdate: should not set time if network delay is too big to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner@bugs.debian.org immediately.) -- 523513: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=523513 Debian Bug Tracking System Contact owner@bugs.debian.org with problems
--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: rdate: should not set time if network delay is too big
- From: Pedro Zorzenon Neto <pzn@debian.org>
- Date: Fri, 10 Apr 2009 16:05:17 -0300
- Message-id: <20090410190517.GA844@sete.ideale>
Package: rdate Version: 1:1.1.3-2 Severity: wishlist Tags: patch Hi, I have problems with rdate with hundreds of network clients that use PPP over 9600bps CSD connections. The link "delay" is often less than 2 seconds, but if a file transfer is in progress, it can take 30 seconds for rdate fetching the date. That will make the clock worst than it was. I implemented an option to rdate (-t) that does not set the clock when it took more than an specified time to fetch the time from network. Please add it to the sources, it may be useful for others. Usage example: rdate -t 3500 192.168.10.20 if it took more than 3.5 seconds for fetching the time, it will not set it (instead, it will exit with an error). Thanks, Pedro -- System Information: Debian Release: 5.0 APT prefers stable APT policy: (990, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.26-1-amd64 (SMP w/2 CPU cores) Locale: LANG=pt_BR.UTF-8, LC_CTYPE=pt_BR.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages rdate depends on: ii libc6 2.7-18 GNU C Library: Shared libraries rdate recommends no packages. rdate suggests no packages. -- no debconf informationdiff -ur rdate-1.1.3-old/docs/rdate.8 rdate-1.1.3-new/docs/rdate.8 --- rdate-1.1.3-old/docs/rdate.8 2009-04-10 15:49:34.000000000 -0300 +++ rdate-1.1.3-new/docs/rdate.8 2009-04-10 15:52:42.000000000 -0300 @@ -40,6 +40,7 @@ .Nm rdate .Op Fl 46acnpsuv .Op Fl o Ar port +.Op Fl t Ar msec .Ar host .Sh DESCRIPTION .Nm @@ -88,6 +89,10 @@ Do not print the time. .It Fl u Use UDP instead of TCP as transport. +.It Fl t Ar msec +Does not set time if it took more than +.Ar msec +mili-seconds to fetch time from network. .It Fl v Verbose output. Always show the adjustment. diff -ur rdate-1.1.3-old/src/rdate.c rdate-1.1.3-new/src/rdate.c --- rdate-1.1.3-old/src/rdate.c 2009-04-10 15:49:34.000000000 -0300 +++ rdate-1.1.3-new/src/rdate.c 2009-04-10 15:55:12.000000000 -0300 @@ -38,6 +38,7 @@ * Time is returned as the number of seconds since * midnight January 1st 1900. */ +/* option -t implemented by Pedro Zorzenon Neto - 2009-04-10 */ #ifndef lint #if 0 from: static char rcsid[] = "$NetBSD: rdate.c,v 1.3 1996/02/22 06:59:18 thorpej Exp $"; @@ -77,7 +78,7 @@ void usage(void) { - (void) fprintf(stderr, "Usage: %s [-46acnpsv] [-o port] host\n", __progname); + (void) fprintf(stderr, "Usage: %s [-46acnpsv] [-o port] [ -t msec ] host\n", __progname); (void) fprintf(stderr, " -4: use IPv4 only\n"); (void) fprintf(stderr, " -6: use IPv6 only\n"); (void) fprintf(stderr, " -a: use adjtime instead of instant change\n"); @@ -87,6 +88,7 @@ (void) fprintf(stderr, " -p: just print, don't set\n"); (void) fprintf(stderr, " -s: just set, don't print\n"); (void) fprintf(stderr, " -u: use UDP instead of TCP as transport\n"); + (void) fprintf(stderr, " -t msec: does not set clock if network delay greater than msec\n"); (void) fprintf(stderr, " -v: verbose output\n"); } @@ -102,8 +104,12 @@ int port = 0; struct timeval new, adjust; + int maxdelay = 0; + int netdelay = 0; + struct timeval netdelay1, netdelay2; + struct timezone tz; - while ((c = getopt(argc, argv, "46psancvuo:")) != -1) + while ((c = getopt(argc, argv, "46psancvuo:t:")) != -1) switch (c) { case '4': family = PF_INET; @@ -145,6 +151,10 @@ port = atoi(optarg); break; + case 't': + maxdelay = atoi(optarg); + break; + default: usage(); return 1; @@ -156,11 +166,25 @@ } hname = argv[optind]; + if (maxdelay) { + gettimeofday(&netdelay1, &tz); + } if (ntp) ntp_client(hname, family, &new, &adjust, corrleaps, port, verbose); else rfc868time_client(hname, family, &new, &adjust, corrleaps, useudp, port); + if (maxdelay) { + gettimeofday(&netdelay2, &tz); + netdelay = (netdelay2.tv_sec - netdelay1.tv_sec) * 1000; + netdelay += (netdelay2.tv_usec - netdelay1.tv_usec) / 1000; + if (netdelay > maxdelay) { + fprintf(stderr, "%s: Network delay exceeded (%i msec)\n", + __progname, netdelay); + exit(2); + } + } + if (!pr) { if (!slidetime) { logwtmp("|", "date", ""); @@ -195,6 +219,13 @@ "%s: adjust local clock by %ld seconds\n", __progname, adjust.tv_sec); } + + if (maxdelay) { + (void) fprintf(stdout, + "%s: network delay %i msecs\n", + __progname, netdelay); + } + } return 0;
--- End Message ---
--- Begin Message ---
- To: 523513-close@bugs.debian.org
- Subject: Bug#523513: fixed in rdate 1:1.10-1
- From: Thiago Andrade Marques <thmarques@gmail.com>
- Date: Thu, 10 Oct 2019 17:05:19 +0000
- Message-id: <E1iIbsN-0001sd-LB@fasolo.debian.org>
Source: rdate Source-Version: 1:1.10-1 We believe that the bug you reported is fixed in the latest version of rdate, which is due to be installed in the Debian FTP archive. A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to 523513@bugs.debian.org, and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Thiago Andrade Marques <thmarques@gmail.com> (supplier of updated rdate package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing ftpmaster@ftp-master.debian.org) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Format: 1.8 Date: Wed, 09 Oct 2019 18:03:00 -0300 Source: rdate Architecture: source Version: 1:1.10-1 Distribution: unstable Urgency: medium Maintainer: Thiago Andrade Marques <thmarques@gmail.com> Changed-By: Thiago Andrade Marques <thmarques@gmail.com> Closes: 523513 925059 941391 Changes: rdate (1:1.10-1) unstable; urgency=medium . * New maintainer. (Closes: #925059) * New upstream version 1.10. (Closes: #523513, #941391) * debian/control: - Bumped Standards Version to 4.4.1. - Updated short and long description. - Updated the homepage field. (Closes: #941391) * debian/copyright: full updated. * debian/docs: added some important upstream files. * debian/patches/*: removed all patches. Upstream fixed the source code. * debian/rules: removed LDFLAGS, no longer needed. * debian/watch: updated, new upstream site. Checksums-Sha1: 2b698b0fcc9669bf4d84e92d6a5df0c000a53125 1917 rdate_1.10-1.dsc 0b020d0de6648eedd7b9d8fb9743e9c72171ab3f 19159 rdate_1.10.orig.tar.gz a339e0b4d2ce331b405d5ebafbe0f40f87c4af86 5412 rdate_1.10-1.debian.tar.xz 8e7b9b79fb8d2f3122bf7b7622aa2e8e6561e673 5185 rdate_1.10-1_source.buildinfo Checksums-Sha256: 4cf917403d6acb2f0d101e5c735204df9e36f3ad79866e0737c4b480a8d50484 1917 rdate_1.10-1.dsc 8a29eed664e1ba3f628ac16227da2f872d595ddf0be2daee23fbc9da7fc7846a 19159 rdate_1.10.orig.tar.gz af4dcb258ad1e02c595fdb190f0fba08c94565fec7f5aefaacd03489fab6fa27 5412 rdate_1.10-1.debian.tar.xz 7376abf4ee6c5df4067718b62708cf17b18abdd9e280ef24548dd263aa565851 5185 rdate_1.10-1_source.buildinfo Files: df5cfcdc586d6ad6c76d21070cc747e6 1917 net optional rdate_1.10-1.dsc b11a799212daf5e199c4ed9dadfaa486 19159 net optional rdate_1.10.orig.tar.gz e7f20139b4afadb26da9f685d74c76fe 5412 net optional rdate_1.10-1.debian.tar.xz bd153451321fbd66b019e87b6a607e17 5185 net optional rdate_1.10-1_source.buildinfo -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEENX3LDuyVoBrrofDS3mO5xwTr6e8FAl2fYAcACgkQ3mO5xwTr 6e/4zA/7BBIOVXmGBZIJwzX2dP0ylu0U6RnE03wn6biupyVvevydlGJlUndLd/U4 2bJuQyaDoR1TGC7Gj5vAQ3ddHE/wBNBzYyqFYjPi0WGQfXcb4d3WEXl8McqJZtKE GAWlZ5nbwADMJLZt8zftiV+gqHm/BgXhOl+FwmEarQG359/Eky7w1moYNRQ+wmfH 0kdNjQBR1SctAApa2fM+OdPgWfk1a+WcmU+52duefU5V/71oXWgCRdSNu2WyYQF8 2meJs9xT24qd/QcE/XJ/XQo8GqGVTzOmztZD+MnaOtG8CjeQ3SVciiLsuNWZVBjf ozO5bLV5HvH7tVdvLXF5d/+C7v9csS6oucISdjnpz8Pdt1kvOM0F1gjj7wCVs1dU Rj9eJxKP6pUc/mww9Rbdq7Er7d4K9GcX2QVS3dWfsiX+XaPRshGlCbzh9KTmp6dY cKjj/ObVbDQKrxFwROvgwysj9SDEzI6oXKoWfWkW1X12bwtD5hfNGsmIx4ZmGX5X YAfBI/K0TaI3d4fu58US3XNvrjiX8yj5tb8fPE5aQiD0bCP+WD1Cy3NRCm/bXif4 Y+NpoYrg5iyAgh9gFC2N/Xfb3p8yungLsvz23RFgE0TKwPTRkz1nCDhnmiD1ITct 1jGN/dTuXGdupqCdMNjtFtyHiQfLas7Xe4eWbKM2d9W8SOLH2to= =lAax -----END PGP SIGNATURE-----
--- End Message ---