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:

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_unlock_bh() {
      kfree_skb() {

(Timing information removed and irrelevant fragments replaced by

Relevant kernel source code:

Function discards the packet: ip6_mc_input

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

(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

So the ultimate decision is made by this function: ipv6_chk_mcast_addr

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 Ubuntu
Bugs, which is subscribed to Ubuntu.

  DHCPv6 does not work in Hyper-V

To manage notifications about this bug go to:

ubuntu-bugs mailing list

Reply via email to