NetBSD Problem Report #57991

From www@netbsd.org  Sun Mar  3 03:59:35 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 185951A9239
	for <gnats-bugs@gnats.NetBSD.org>; Sun,  3 Mar 2024 03:59:35 +0000 (UTC)
Message-Id: <20240303035933.86A4E1A923A@mollari.NetBSD.org>
Date: Sun,  3 Mar 2024 03:59:33 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: sysinst http/ftp download Host isn't clear about IPv6 address syntax
X-Send-Pr-Version: www-1.0

>Number:         57991
>Category:       install
>Synopsis:       sysinst http/ftp download Host isn't clear about IPv6 address syntax
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    install-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Mar 03 04:00:00 +0000 2024
>Last-Modified:  Sun Mar 03 04:05:01 +0000 2024
>Originator:     Taylor R Campbell
>Release:        current (10.99.4)
>Organization:
The Sysinstall6 Foundation
>Environment:
>Description:
When I ask to download sets via HTTP or FTP, the Host field seems an appropriate place to put an IPv6 address, but it can't be put in verbatim because sysinst passes it through to ftp(1) without escaping:

     Status: Command failed
    Command: /usr/bin/ftp -a http://2001:db8::1234/evbarm-aarch64/binary/sets/modules.tgz
     Hit enter to continue
&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;&#9472;
ftp: Unknown port `db8::1234' in URL `http://2001:db8::1234/evbarm-aarch64/binary/sets/modules.tgz'

>How-To-Repeat:
type an IPv6 address into the Host field for downloading sets
>Fix:
sysinst needs to recognize the IPv6 address and wrap it in square brackets:

/usr/bin/ftp -a http://[2001:db8::1234]/evbarm-aarch64/binary/sets/modules.tgz

>Audit-Trail:
From: Taylor R Campbell <riastradh@NetBSD.org>
To: gnats-bugs@NetBSD.org, install-manager@NetBSD.org,
	gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org
Cc: 
Subject: Re: install/57991: sysinst http/ftp download Host isn't clear about IPv6 address syntax
Date: Sun, 3 Mar 2024 04:02:23 +0000

 Oops -- wrapping in square brackets automatically doesn't work because
 the Host field is the only place to put a port, so it really is the
 user's responsibility to wrap in square brackets (since otherwise it
 would be ambiguous with a port), which also isn't very clear.

 Or, we could have a separate Port field.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.