wget does not support IPv6 address with scoped zone (RFC 4007)

Bug #1566930 reported by Robert C Jennings
This bug affects 7 people
Affects Status Importance Assigned to Milestone
wget (Ubuntu)

Bug Description

IMPACT: wget is not usable in the default configuration for LXD containers in Xenial

Summary: A scoped zone address in the form [<address>%<interface] is not supported by wget. The default network configuration of lxd in xenial containers is to use an http_proxy address that is a scoped IPv6 address 'http://[fe80::1%eth0]:13128'.

$ lxc exec test -- wget http://www.google.com
Error parsing proxy URL http://[fe80::1%eth0]:13128: Invalid IPv6 numeric address.

Steps to recreate:
 - Install lxd 2.0.0~rc8-0ubuntu5
 - Launch a conatiner (lxc launch ubuntu-daily:xenial test)
 - lxc exec test -- wget 'http://www.google.com'

These instructions use an LXD environment as an easy way to create a test environment with an IPv6 proxy using a scoped address.

Revision history for this message
Robert C Jennings (rcj) wrote :

RFC 4007 : https://www.ietf.org/rfc/rfc4007.txt
Discussion upstream : http://lists.gnu.org/archive/html/bug-wget/2009-06/msg00000.html

Attaching a POC patch from upstream mailing list to demonstrate the fix, but it is hackish.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in wget (Ubuntu):
status: New → Confirmed
Revision history for this message
wayne (wayne-flashmedia) wrote :

How do I work around this?

Revision history for this message
Brian Candler (b-candler) wrote :

Workaround is to use IPv4/NAT networking instead of link-local IPv6/http_proxy.

1. configure your lxdbr0 network with (private) IPv4 addresses and DHCP pool in /etc/default/lxd-bridge. Also set LXD_IPV4_NAT="true" and LXD_IPV6_PROXY="false". Restart.

2. "lxc profile edit default" to no longer use the IPv6 proxy.

name: default
config: {}
description: Default LXD profile
    name: eth0
    nictype: bridged
    parent: lxdbr0
    type: nic

Revision history for this message
Tim Howard (timothy-howard) wrote :

Gold star for this man ^^^. Thanks.

Revision history for this message
Adrian Schmutzler (adridolf) wrote :

Maybe this is helpful for fixing:
On a router with LEDE-based OS, I have two different "versions" of wget:

With full wget 1.18, I cannot use an IPv6 address with interface as described above.

However, with the wget included in BusyBox v1.25.1, the same command is working!

Command (in both cases):
wget http://[fe80::someip%br-mesh]/dev/firmware/current/release.nfo -P /tmp

Revision history for this message
Ard van Breemen (ard) wrote :

dr@odroid:~$ export http_proxy=http://[fe80::9864:b6ff:fe00:3410%eth0]:3128/
dr@odroid:~$ curl -o gl.deb http://deb.odroid.in/5422-s/pool/main/m/mali-x11/mali-x11_20170718-r17p0-20503ff-3_armhf.deb
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
100 8157k 100 8157k 0 0 1932k 0 0:00:04 0:00:04 --:--:-- 1932k
dr@odroid:~$ wget http://deb.odroid.in/5422-s/pool/main/m/mali-x11/mali-x11_20170718-r17p0-20503ff-3_armhf.deb
Error parsing proxy URL http://[fe80::9864:b6ff:fe00:3410%eth0]:3128/: Invalid IPv6 numeric address.

this is on bionic using verion 1.19.4-1ubuntu2 .

I can confirm that the busybox version of wget knows how to correctly handle ipv6. (and gpg).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers