From: Harlan Stenn Date: Mon, 4 May 2015 06:46:05 +0000 (+0000) Subject: [Bug 2822] New leap column in sntp broke NTP::Util.pm X-Git-Tag: NTP_4_3_28~1^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd0305e309577c07594311c397a460447d7a41a9;p=thirdparty%2Fntp.git [Bug 2822] New leap column in sntp broke NTP::Util.pm bk: 554715adFAJ28lwT1_q2nAVOmf0wWQ --- diff --git a/ChangeLog b/ChangeLog index 6c655f2d1..3e8634fdc 100644 --- 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. diff --git a/scripts/lib/NTP/Util.pm b/scripts/lib/NTP/Util.pm index cd2f9e5a7..f37aeaa65 100644 --- a/scripts/lib/NTP/Util.pm +++ b/scripts/lib/NTP/Util.pm @@ -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);