integ/base/ntp/centos/patches/Fix-ntpq-truncates-IPV6-addresses.patch
Kristine Bujold 588e39fe64 Add new ntp package to build
This is required to fix a bug with ntpq and IPV6 addresses. The ntpq
command truncates the remote addresses to 15 characters. This is not
long enough for IPV6 addresses. This has been fixed in version 4.2.8
which is not yet released by Centos. Patch
Fix-ntpq-truncates-IPV6-addresses.patch provides a subset of the fix.

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

Depends-On: https://review.opendev.org/680105
Partial-Bug: 1840687

Change-Id: If9d07acf913ebebead5505d44129f0644511b748
Signed-off-by: Kristine Bujold <kristine.bujold@windriver.com>
2019-09-09 10:43:30 -04:00

27 lines
870 B
Diff

From c135c30f1196b081619e1f4164840748b7815f24 Mon Sep 17 00:00:00 2001
From: Kristine Bujold <kristine.bujold@windriver.com>
Date: Tue, 3 Sep 2019 16:58:39 -0400
Subject: [PATCH] ntpq truncates "remote" host information when system is IPV6
Signed-off-by: Kristine Bujold <kristine.bujold@windriver.com>
---
ntpq/ntpq-subs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ntpq/ntpq-subs.c b/ntpq/ntpq-subs.c
index c834ce6..0ed8933 100644
--- a/ntpq/ntpq-subs.c
+++ b/ntpq/ntpq-subs.c
@@ -1614,7 +1614,7 @@ doprintpeers(
}
if (AF_UNSPEC == af || AF(&srcadr) == af) {
strncpy(clock_name, nntohost(&srcadr), sizeof(clock_name));
- fprintf(fp, "%c%-15.15s ", c, clock_name);
+ fprintf(fp, "%c%s\n ", c, clock_name);
drlen = strlen(dstadr_refid);
makeascii(drlen, dstadr_refid, fp);
while (drlen++ < 15)
--
1.8.3.1