Project

General

Profile

Actions

Bug #4815

closed

NTP status widget shows truncated IPv6 address

Added by Kill Bill over 6 years ago. Updated almost 5 years ago.

Status:
Resolved
Priority:
Very Low
Category:
Web Interface
Target version:
Start date:
07/04/2015
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
All
Affected Architecture:
All

Description

See screenshot. In fact, the IP is 2001:718:801:230::8c as confirmed by ntpq -p.

Actions #1

Updated by Kill Bill over 6 years ago

Well, apparently there's the same issue with Status - NTP. This can be solved by using -w option (https://bugs.ntp.org/show_bug.cgi?id=1128), works without further changes for the widget, but breaks the Status - NTP page.

https://bugs.ntp.org/show_bug.cgi?id=1128

--- a/usr/local/www/widgets/widgets/ntp_status.widget.php   2015-07-04 17:52:56.938845757 +0200
+++ b/usr/local/www/widgets/widgets/ntp_status.widget.php        2015-07-04 17:53:30.454841035 +0200
@@ -48,7 +48,7 @@
        else
                $inet_version = " -4";

-       exec("/usr/local/sbin/ntpq -pn $inet_version | /usr/bin/tail +3", $ntpq_output);
+       exec("/usr/local/sbin/ntpq -pn -w $inet_version | /usr/bin/tail +3", $ntpq_output);
        $ntpq_counter = 0;
        foreach ($ntpq_output as $line) {
                if (substr($line, 0, 1) == "*") {

Actions #2

Updated by Renato Botelho almost 5 years ago

  • Status changed from New to Feedback
  • Assignee set to Renato Botelho
  • Target version set to 2.4.0
  • % Done changed from 0 to 100

PR has been merged, thanks!

Actions #3

Updated by Kill Bill almost 5 years ago

Thanks as well.

(As for Status - NTP, AFAICT that'd require completely rewriting the code because of the "wonderful" upstream solution to use a newline instead of wider columns. Gave up on that.)

Actions #4

Updated by Jim Pingle almost 5 years ago

  • Status changed from Feedback to Resolved

Works

Actions #5

Updated by Jim Pingle almost 5 years ago

  • Target version changed from 2.4.0 to 2.3.3
Actions

Also available in: Atom PDF