]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 2822] New leap column in sntp broke NTP::Util.pm
authorHarlan Stenn <stenn@ntp.org>
Mon, 4 May 2015 06:46:05 +0000 (06:46 +0000)
committerHarlan Stenn <stenn@ntp.org>
Mon, 4 May 2015 06:46:05 +0000 (06:46 +0000)
bk: 554715adFAJ28lwT1_q2nAVOmf0wWQ

ChangeLog
scripts/lib/NTP/Util.pm

index 6c655f2d1972259ef6557a5e0aa2dca014cb539a..3e8634fdc332d0ed53af3537ca54ec860166ea4e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -20,6 +20,7 @@
 * [Bug 2810] refclock_shm.c memory barrier code needs tweaks for QNX.
 * [Bug 2813] HP-UX needs -D__STDC_VERSION__=199901L and limits.h.
 * [Bug 2815] net-snmp before v5.4 has circular library dependencies.
+* [Bug 2822] New leap column in sntp broke NTP::Util.pm.
 * Improve the ntpq documentation around the controlkey keyid.
 * ntpq.c cleanup.
 * Windows port build cleanup.
index cd2f9e5a7a5d524a2bc6726c0e43a5a571f9304e..f37aeaa6544605be41b29ccb1a8587857f7e7c7d 100644 (file)
@@ -139,7 +139,7 @@ sub ntp_sntp_line {
         my @output = split / /;
 
         $offset = $output[3];
-        ($stratum = pop @output) =~ s/s(\d{1,2})/$1/;
+        ($stratum = $output[7]) =~ s/s(\d{1,2})/$1/;
     }
     close $fh or croak "running sntp failed: $! (exit status $?)";
     return ($offset, $stratum);