Same happens in Ubuntu 14.04 with kernel 4.4.0-36-generic. Also
reproduced on the above 16.04 distribution.
DHCPv6 server: isc-dhcp-server in IPv6 mode (isc-dhcp-server6)
Wireshark captures indicate that the solicit is sent from the client,
arrives to the server's network interface, then lost in the kernel
before arriving to dhcpd.
Cleared ip6tables and tc completely, so no firewall nor QoS could
block/redirect the packet.
Running dhcpd under strace in the foreground confirms that no broadcast
packet is received in user space.
Traced kernel function calls:
#!/bin/bash
mkdir -p /debug
mount -t debugfs nodev /debug
mount -t debugfs nodev /sys/kernel/debug
echo '*' >/debug/tracing/set_ftrace_filter
echo function_graph >/debug/tracing/current_tracer
echo 1 >/debug/tracing/tracing_on
sleep 10
echo 0 >/debug/tracing/tracing_on
cat /debug/tracing/trace > tracing.$$.out
Found the following fragment, where the packet is dropped:
ipv6_rcv() {
...
ip6_rcv_finish() {
...
ip6_mc_input() {
ipv6_chk_mcast_addr() {
_raw_read_lock_bh();
_raw_read_unlock_bh() {
__local_bh_enable_ip();
}
}
kfree_skb() {
...
}
}
}
}
(Timing information removed and irrelevant fragments replaced by
ellipsis.)
Relevant kernel source code:
Function discards the packet: ip6_mc_input
http://lxr.free-electrons.com/source/net/ipv6/ip6_input.c?v=4.4#L285
Decision is based on false value returned here:
deliver = ipv6_chk_mcast_addr(skb->dev, &hdr->daddr, NULL);
I verified that deliver is false by instrumenting the kernel with printk
here.
(The long conditional block after the above code line does nothing,
since it is not an MLD packet.)
Packet is discarded at the end of function by calling the kfree_skb
function.
So the ultimate decision is made by this function: ipv6_chk_mcast_addr
http://lxr.free-electrons.com/source/net/ipv6/mcast.c?v=4.4#L955
Please note that src_addr = NULL. (See the function call above.)
I verified by kernel logging that idev is not NULL, so the device is
found here.
Since src_addr is NULL rv can only be true if the for loop finds the
destination address of the packet (variable: group) in the list of
registered broadcast addresses.
Listing registered broadcast groups: netstat -g
I verified that dhcpd is indeed registered to ff02::1:2
Registration is also visible in the strace output.
I can get an address with the server (from itself) by adding a new
virtual network adapter and connecting it to the same network. So it
works if the packet remains inside the VM and does not go through the
virtual switch.
I have spent days on this problem so far. Any ideas?
--
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1624722
Title:
DHCPv6 does not work in Hyper-V
Status in linux package in Ubuntu:
Confirmed
Bug description:
When using Ubuntu (in this case the live 16.04.1 LTS ISO) as a
Generation 2 (Gen1 untested) Hyper-V VM, an IPv6 address can't be
gotten through DHCPv6. dhclient continues to send out solicitations
but they never result in a response. I've looked on the router end
(running AdvancedTomato and dnsmasq) and the router is getting the
requests and is sending out a advertisement, but the VM never gets it.
Using the exact same live ISO works in VirtualBox so I've convinced it
is an issue with the Hyper-V network driver or something along those
lines.
The only IPv6 address that is configured automatically is the fe80
link-local address.
Windows VMs and older Linux VMs (Debian jessie with 3.16 kernel) work
just fine and receive an IPv6 via DHCPv6.
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: linux-image-4.4.0-31-generic 4.4.0-31.50
ProcVersionSignature: Ubuntu 4.4.0-31.50-generic 4.4.13
Uname: Linux 4.4.0-31-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq',
'/dev/snd/timer'] failed with exit code 1:
CasperVersion: 1.376
CurrentDesktop: Unity
Date: Sat Sep 17 19:56:42 2016
IwConfig:
lo no wireless extensions.
eth0 no wireless extensions.
LiveMediaBuild: Ubuntu 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160719)
Lspci:
Lsusb: Error: command ['lsusb'] failed with exit code 1:
MachineType: Microsoft Corporation Virtual Machine
ProcEnviron:
TERM=xterm-256color
PATH=(custom, no user)
XDG_RUNTIME_DIR=<set>
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcFB: 0 hyperv_fb
ProcKernelCmdLine: BOOT_IMAGE=/casper/vmlinuz.efi
file=/cdrom/preseed/username.seed boot=casper quiet splash ---
RelatedPackageVersions:
linux-restricted-modules-4.4.0-31-generic N/A
linux-backports-modules-4.4.0-31-generic N/A
linux-firmware 1.157.2
RfKill:
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 11/26/2012
dmi.bios.vendor: Microsoft Corporation
dmi.bios.version: Hyper-V UEFI Release v1.0
dmi.board.asset.tag: None
dmi.board.name: Virtual Machine
dmi.board.vendor: Microsoft Corporation
dmi.board.version: Hyper-V UEFI Release v1.0
dmi.chassis.asset.tag: 5808-9631-9266-5991-2472-7695-55
dmi.chassis.type: 3
dmi.chassis.vendor: Microsoft Corporation
dmi.chassis.version: Hyper-V UEFI Release v1.0
dmi.modalias:
dmi:bvnMicrosoftCorporation:bvrHyper-VUEFIReleasev1.0:bd11/26/2012:svnMicrosoftCorporation:pnVirtualMachine:pvrHyper-VUEFIReleasev1.0:rvnMicrosoftCorporation:rnVirtualMachine:rvrHyper-VUEFIReleasev1.0:cvnMicrosoftCorporation:ct3:cvrHyper-VUEFIReleasev1.0:
dmi.product.name: Virtual Machine
dmi.product.version: Hyper-V UEFI Release v1.0
dmi.sys.vendor: Microsoft Corporation
---
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq',
'/dev/snd/timer'] failed with exit code 1:
CasperVersion: 1.376
CurrentDesktop: Unity
DistroRelease: Ubuntu 16.04
IwConfig:
lo no wireless extensions.
eth0 no wireless extensions.
LiveMediaBuild: Ubuntu 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160719)
Lspci:
Lsusb: Error: command ['lsusb'] failed with exit code 1:
MachineType: Microsoft Corporation Virtual Machine
Package: linux (not installed)
ProcEnviron:
TERM=xterm-256color
PATH=(custom, no user)
XDG_RUNTIME_DIR=<set>
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcFB: 0 hyperv_fb
ProcKernelCmdLine: BOOT_IMAGE=/casper/vmlinuz.efi
file=/cdrom/preseed/username.seed boot=casper quiet splash ---
ProcVersionSignature: Ubuntu 4.4.0-31.50-generic 4.4.13
RelatedPackageVersions:
linux-restricted-modules-4.4.0-31-generic N/A
linux-backports-modules-4.4.0-31-generic N/A
linux-firmware 1.157.2
RfKill:
Tags: xenial
Uname: Linux 4.4.0-31-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
_MarkForUpload: True
dmi.bios.date: 11/26/2012
dmi.bios.vendor: Microsoft Corporation
dmi.bios.version: Hyper-V UEFI Release v1.0
dmi.board.asset.tag: None
dmi.board.name: Virtual Machine
dmi.board.vendor: Microsoft Corporation
dmi.board.version: Hyper-V UEFI Release v1.0
dmi.chassis.asset.tag: 5808-9631-9266-5991-2472-7695-55
dmi.chassis.type: 3
dmi.chassis.vendor: Microsoft Corporation
dmi.chassis.version: Hyper-V UEFI Release v1.0
dmi.modalias:
dmi:bvnMicrosoftCorporation:bvrHyper-VUEFIReleasev1.0:bd11/26/2012:svnMicrosoftCorporation:pnVirtualMachine:pvrHyper-VUEFIReleasev1.0:rvnMicrosoftCorporation:rnVirtualMachine:rvrHyper-VUEFIReleasev1.0:cvnMicrosoftCorporation:ct3:cvrHyper-VUEFIReleasev1.0:
dmi.product.name: Virtual Machine
dmi.product.version: Hyper-V UEFI Release v1.0
dmi.sys.vendor: Microsoft Corporation
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1624722/+subscriptions
--
Mailing list: https://launchpad.net/~kernel-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~kernel-packages
More help : https://help.launchpad.net/ListHelp