[Solved] IPv6 relay mode not working

Dear community,

I have just switched my WZR-HP-G300H box from OpenWrt to LEDE 17.01.0-rc1.
While there is no problem about IPv4, IPv6 is not working on clients.
I'm using relay mode without upstream dhcpv6 and the routing table reads as below.

default from $PREFIX::/64 via fe80::10ff:fe02:2062 dev eth1  metric 512 
$PREFIX::/64 dev eth1  metric 256 
fe80::/64 dev br-lan  metric 256 
fe80::/64 dev eth1  metric 256 
fe80::/64 dev wlan0  metric 256 
unreachable default dev lo  metric -1  error -128
ff00::/8 dev br-lan  metric 256 
ff00::/8 dev eth1  metric 256 
ff00::/8 dev wlan0  metric 256 
unreachable default dev lo  metric -1  error -128

It seems the cause is that the entry for $prefix::/64 points for upstream.
After I manually add an entry below, clients start working with IPv6.

$PREFIX::/64 dev br-lan  metric 128 

Is this a bug or do I need some configuration change from OpenWrt?

I am seeing the same behavior on my HT-TM02 with LEDE 17.01.0-rc1. At least the WAN is getting an IPv6 via SLAAC now, even that failed on CC 15.05.1. I've run tcpdump on both the LAN and WAN interfaces and the LAN receives a router solicitation from my laptop, but it never gets sent out the WAN side to the upstream router. Is there some kind of log file for odhcpd I can look at to see if it's even receiving anything?

/etc/config/network:

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd20:0787:2c66::/48'

config interface 'lan'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option _orig_ifname 'eth0'
        option _orig_bridge 'false'
        option ip6assign '64'

config device 'lan_dev'
        option name 'eth0'
        option macaddr '00:1c:c2:13:6f:05'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '0'

config interface 'wan'
        option proto 'dhcp'
        option ifname 'eth0'

config interface 'wan6'
        option proto 'dhcpv6'
        option ifname 'eth0'
        option reqaddress 'try'
        option reqprefix 'auto'

/etc/config/dhcp:

config dnsmasq
        option domainneeded '1'
        option boguspriv '1'
        option filterwin2k '0'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option nonegcache '0'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.auto'
        option localservice '1'

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv6 'relay'
        option ra 'relay'
        option ndp 'relay'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

config dhcp 'wan6'
        option dhcpv6 'relay'
        option ra 'relay'
        option ndp 'relay'
        option master '1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'

I've just updated to 17.01.0-rc2 r3131-42f3c1f, but the problem still exists.

Any help?

After upgrading to LEDE 17.01.0, r3205-59508e3, now routing table entry for each client gets properly generated.

Thanks for the fix!

With that build it's not working for me.

I'm on AT&T with the 3800HGV-B, With DHCPv6, I get the correct IPv6 Address and stuff, but the wan side only gives out ULA for an address and I'm not getting the public IPv6 address, so routing isn't going to happen. Any thought?

More notes: I had this working on OpenWRT briefly, but when I try to put in a firewall rule for a port in IPv6 it hit the fan and had to migrate back to not using IPv6.

This issue persists in 17.01.0 for me. Interestingly, I am also on AT&T with a 3800HGV-B like ellisgl. Not sure if that's the cause of the problem or simply that we are the small minority that actually need IPv6 relay mode. In any case, I have submitted a bug report to see if that goes anywhere: https://bugs.lede-project.org/index.php?do=details&task_id=656. Feel free to vote on it to gain attention.