From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48160) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c79CK-0000MD-0G for qemu-devel@nongnu.org; Wed, 16 Nov 2016 18:00:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c79CG-0007DU-RI for qemu-devel@nongnu.org; Wed, 16 Nov 2016 18:00:56 -0500 Received: from indium.canonical.com ([91.189.90.7]:40044) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c79CG-0007Cs-LX for qemu-devel@nongnu.org; Wed, 16 Nov 2016 18:00:52 -0500 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.76 #1 (Debian)) id 1c79CF-00075X-F3 for ; Wed, 16 Nov 2016 23:00:51 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 606A52E80BF for ; Wed, 16 Nov 2016 23:00:51 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Wed, 16 Nov 2016 22:52:38 -0000 From: manut Reply-To: Bug 1642421 <1642421@bugs.launchpad.net> Sender: bounces@canonical.com Message-Id: <20161116225238.8681.9123.malonedeb@gac.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 1642421] [NEW] qemu-system-x86_64: ipv6 and dns is broken with netdev user List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Public bug reported: Hi, dhcp inside qemu returns an ipv6 address as dns-server. However this is not working. If i replace it with the ipv4 address '10.0.0.2' dns is working again. I would expect that the qemu emulated dhcp server responds either an ipv4 configuration that is working or its dns server/forwarder listens on t= he ipv6 address returned by the emulated dhcp server. I used latest qemu from git ( b0bcc86d2a87456f5a276f941dc775b265b309cf) and used the following commands: $ ./qemu-system-x86_64 -enable-kvm -M pc -device virtio-rng-pci -device virtio-net-pci,netdev=3Duser.0 -drive file=3Dbuildenv.img,if=3Dvirtio,bus= =3D1,unit=3D0 -no-reboot -netdev user,id=3Duser.0,hostfwd=3Dtcp::5022-:22,hostfwd=3Dtcp::= 7587-:7588 -m 1024 -usb -nographic -smp 4 buildenv.img is a debian jessie amd64 installation. Inside qemu the network is configured to use dhcp: $ cat /etc/network/interfaces allow-hotplug eth0 iface eth0 inet dhcp $ ifconfig eth0 eth0 Link encap:Ethernet HWaddr 52:54:00:12:34:56 inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0 inet6 addr: fe80::5054:ff:fe12:3456/64 Scope:Link inet6 addr: fec0::5054:ff:fe12:3456/64 Scope:Site UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:10 errors:0 dropped:0 overruns:0 frame:0 TX packets:28 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:3215 (3.1 KiB) TX bytes:3638 (3.5 KiB) $ cat /etc/resolv.conf nameserver fec0::3 $ arp google.de google.de: Host name lookup failure $ strace -f arp google.de ... socket(PF_INET6, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) =3D 4 connect(4, {sa_family=3DAF_INET6, sin6_port=3Dhtons(53), inet_pton(AF_INET6= , "fec0::3", &sin6_addr), sin6_flowinfo=3D0, sin6_scope_id=3D0}, 28) =3D 0 poll([{fd=3D4, events=3DPOLLOUT}], 1, 0) =3D 1 ([{fd=3D4, revents=3DPOLL= OUT}]) sendto(4, "\17\320\1\0\0\1\0\0\0\0\0\0\6google\2de\0\0\1\0\1", 27, MSG_NOSI= GNAL, NULL, 0) =3D 27 poll([{fd=3D4, events=3DPOLLIN}], 1, 5000) =3D 0 (Timeout) poll([{fd=3D4, events=3DPOLLOUT}], 1, 0) =3D 1 ([{fd=3D4, revents=3DPOLL= OUT}]) sendto(4, "\17\320\1\0\0\1\0\0\0\0\0\0\6google\2de\0\0\1\0\1", 27, MSG_NOSI= GNAL, NULL, 0) =3D 27 poll([{fd=3D4, events=3DPOLLIN}], 1, 5000) =3D 0 (Timeout) close(4) =3D 0 ... $ echo nameserver 10.0.0.2 > /etc/resolv.conf $ arp google.de google.de (216.58.208.35) -- no entry Note: I reported this bug also to debian: https://bugs.debian.org/cgi- bin/bugreport.cgi?bug=3D844566 Regards, Manuel ** Affects: qemu Importance: Undecided Status: New -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1642421 Title: qemu-system-x86_64: ipv6 and dns is broken with netdev user Status in QEMU: New Bug description: Hi, dhcp inside qemu returns an ipv6 address as dns-server. However this is n= ot working. If i replace it with the ipv4 address '10.0.0.2' dns is working again. I would expect that the qemu emulated dhcp server responds either = an ipv4 configuration that is working or its dns server/forwarder listens on= the ipv6 address returned by the emulated dhcp server. I used latest qemu from git ( b0bcc86d2a87456f5a276f941dc775b265b309cf) and used the following commands: $ ./qemu-system-x86_64 -enable-kvm -M pc -device virtio-rng-pci -device virtio-net-pci,netdev=3Duser.0 -drive file=3Dbuildenv.img,if=3Dvirtio,bus= =3D1,unit=3D0 -no-reboot -netdev user,id=3Duser.0,hostfwd=3Dtcp::5022-:22,hostfwd=3Dtcp= ::7587-:7588 -m 1024 -usb -nographic -smp 4 buildenv.img is a debian jessie amd64 installation. Inside qemu the network is configured to use dhcp: $ cat /etc/network/interfaces allow-hotplug eth0 iface eth0 inet dhcp $ ifconfig eth0 eth0 Link encap:Ethernet HWaddr 52:54:00:12:34:56 inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0 inet6 addr: fe80::5054:ff:fe12:3456/64 Scope:Link inet6 addr: fec0::5054:ff:fe12:3456/64 Scope:Site UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:10 errors:0 dropped:0 overruns:0 frame:0 TX packets:28 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:3215 (3.1 KiB) TX bytes:3638 (3.5 KiB) $ cat /etc/resolv.conf nameserver fec0::3 $ arp google.de google.de: Host name lookup failure $ strace -f arp google.de ... socket(PF_INET6, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) =3D 4 connect(4, {sa_family=3DAF_INET6, sin6_port=3Dhtons(53), inet_pton(AF_INE= T6, "fec0::3", &sin6_addr), sin6_flowinfo=3D0, sin6_scope_id=3D0}, 28) =3D 0 poll([{fd=3D4, events=3DPOLLOUT}], 1, 0) =3D 1 ([{fd=3D4, revents=3DPO= LLOUT}]) sendto(4, "\17\320\1\0\0\1\0\0\0\0\0\0\6google\2de\0\0\1\0\1", 27, MSG_NO= SIGNAL, NULL, 0) =3D 27 poll([{fd=3D4, events=3DPOLLIN}], 1, 5000) =3D 0 (Timeout) poll([{fd=3D4, events=3DPOLLOUT}], 1, 0) =3D 1 ([{fd=3D4, revents=3DPO= LLOUT}]) sendto(4, "\17\320\1\0\0\1\0\0\0\0\0\0\6google\2de\0\0\1\0\1", 27, MSG_NO= SIGNAL, NULL, 0) =3D 27 poll([{fd=3D4, events=3DPOLLIN}], 1, 5000) =3D 0 (Timeout) close(4) =3D 0 ... $ echo nameserver 10.0.0.2 > /etc/resolv.conf $ arp google.de google.de (216.58.208.35) -- no entry Note: I reported this bug also to debian: https://bugs.debian.org/cgi- bin/bugreport.cgi?bug=3D844566 Regards, Manuel To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1642421/+subscriptions