NetBSD Problem Report #28954

From kim@tac.nyc.ny.us  Thu Jan 13 16:37:18 2005
Return-Path: <kim@tac.nyc.ny.us>
Received: from beowulf.gw.com (beowulf.gw.com [204.80.150.34])
	by narn.netbsd.org (Postfix) with ESMTP id BB9ED63B844
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 13 Jan 2005 16:37:01 +0000 (UTC)
Message-Id: <20050113163700.C21652AC93@beowulf.gw.com>
Date: Thu, 13 Jan 2005 11:37:00 -0500 (EST)
From: kim@tac.nyc.ny.us (Kimmo Suominen)
To: gnats-bugs@netbsd.org
Subject: ntpq does not fall back to IPv4
X-Send-Pr-Version: 3.95

>Number:         28954
>Category:       bin
>Synopsis:       ntpq does not fall back to IPv4
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 13 16:39:06 +0000 2005
>Closed-Date:    Wed Nov 04 21:48:59 +0000 2020
>Last-Modified:  Wed Nov 04 21:48:59 +0000 2020
>Originator:     Kimmo Suominen
>Release:        NetBSD 2.99.11 2004-12-15
>Organization:
<A HREF="http://kimmo.suominen.com/">Kimmo Suominen</A>
>Environment:
System: NetBSD beowulf.gw.com 2.99.11 NetBSD 2.99.11 (GW-GENERIC) #85: Sat Jan 1 11:30:14 EST 2005 kim@hrothgar.gw.com:/usr/src/sys/arch/i386/compile/GW-GENERIC i386
Architecture: i386
Machine: i386
>Description:
When connecting to a host with both IPv6 and IPv4 addresses, ntpq
will not try IPv4 if the IPv6 connection fails.
>How-To-Repeat:
I'm running xnptd v3 on some machines.  It only listens on IPv4.

Connections to localhost fail with "Connection refused".

    beowulf:~> ntpq -p
    ntpq: read: Connection refused
    beowulf:~> ntpq -p 127.0.0.1
	 remote           refid  [... truncated ...]
    beowulf:~> grep localhost /etc/hosts
    ::1                                     localhost
    127.0.0.1                               localhost

Connections to grendel.gw.com fail with "No route to host" (as
beowulf does not have a global IPv6 address or IPv6 routes).

    beowulf:~> ntpq -p grendel.gw.com
    ntpq: connect: No route to host
    Exit 1
    beowulf:~> host grendel.gw.com
    grendel.gw.com has address 204.80.150.1
    grendel.gw.com has IPv6 address 2001:240:584:1::1
    grendel.gw.com mail is handled by 0 grendel.gw.com.
    grendel.gw.com mail is handled by 50 relay.gw.com.
    beowulf:~> ntpq -p 204.80.150.1
	 remote           refid  [... truncated ...]

Normally applications should try IPv4 if IPv6 fails:

    beowulf:~> telnet grendel.gw.com
    Trying 2001:240:584:1::1...
    telnet: connect to address 2001:240:584:1::1: No route to host
    Trying 204.80.150.1...
    Connected to grendel.gw.com.
>Fix:

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: kim@NetBSD.org
State-Changed-When: Wed, 04 Nov 2020 21:48:59 +0000
State-Changed-Why:
Timed out for fix. Everything is running NTP v4 anyway.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: gnats-precook-prs,v 1.4 2018/12/21 14:20:20 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.