Bug 165435

Summary: ntptrace does not try ipv4 if ipv6 fails
Product: [Fedora] Fedora Reporter: Pim Zandbergen <p.zandbergen>
Component: ntpAssignee: Miroslav Lichvar <mlichvar>
Status: CLOSED UPSTREAM QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 4   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-07-21 13:39:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
ntp-4.2.0.a.20050816-2.src.rpm
none
ntpq trace file none

Description Pim Zandbergen 2005-08-09 10:24:03 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6

Description of problem:
ntptrace fails to query another host if that host's hostname resolves to both an ipv4 and an ipv6 address, and that host's ntp implementation does not support ipv6.

Version-Release number of selected component (if applicable):
ntp-4.2.0.a.20040617-8

How reproducible:
Always

Steps to Reproduce:
1. setup an ipv6-capable host with a non-ipv6 capable ntp implementation
2. allow the host to be resolved with both ipv4 and ipv6 addresses
3. query the host using "ntptrace <hostname>"
  

Actual Results:  ntptrace show an error message:
/usr/sbin/ntpq: read: Connection refused


Expected Results:  ntptrace should show the hosts's ntp status,
like would have been shown with the command
"ntptrace <hostname's ipv4 address>"

Additional info:

Comment 1 Petr Raszyk 2005-11-10 14:47:55 UTC
Created attachment 120881 [details]
ntp-4.2.0.a.20050816-2.src.rpm

Where is your 'ntpd' running ? Microsoft Windows OS ? Linux OS ?
Where is your 'ntptrace' (respective 'ntpq') running ? 
Microsof Windows ? Linux ?

Try to install the ntp-4.2.0.a.20050816-2.src.rpm above. It creates 
autotrace/autodebug files in /tmp directory (/tmp/nptd.PID, /tmp/ntpq.PID
(where PID is process-id)).

We get an info about ipv4, ipv6 and the format of ip-address 
(after 'ntptrace-script'). Send me this files, please.

Comment 2 Pim Zandbergen 2006-04-10 13:55:02 UTC
Created attachment 127547 [details]
ntpq trace file

as requested

Comment 3 Pim Zandbergen 2006-04-10 13:58:23 UTC
ntp-4.2.0.a.20050816-2.src.rpm builds executables
that do not exhibit the reported problem. They
work as expected. I built the rpm on an FC5 system.

FC5 comes with a newer version of ntp, but one that
exhibit the problem.


Comment 4 Miroslav Lichvar 2006-07-21 13:39:06 UTC
Problem is in ntpq, it will try to connect only to the first address returned by
getaddrinfo().

It is reported upstream already: https://ntp.isc.org/bugs/show_bug.cgi?id=334