Getting IPv6 to work on this router wasn't easy. Finally figured it out by reading http://www.dd-wrt.com/phpBB2/viewtopic.php?p=768892.
I've pretty much written my own script, but I'm not including everything that I should include... This is just a very basic script which gets the job done. I may later on write a more comprehensive script which includes this fix like http://www.dd-wrt.com/wiki/index.php/IPv6_setup_Hurricane_Electric_Tunnel_Broker.
So, here is /jffs/etc/config/ipv6.startup
#!/bin/sh
insmod ipv6
insmod ip_tunnel
insmod sit
sleep 10
LOG="/tmp/ipv6.log"
RADVD_CONFIG="/tmp/radvd.conf"
SERVER_IPV4_ADDR="216.66.22.2"
SERVER_IPV6_ADDR="2001:470:7:71a::1"
CLIENT_IPV4_ADDR="$(nvram get wan_ipaddr)"
CLIENT_IPV6_ADDR="2001:470:7:71a::2"
ROUTED_64_ADDR="2001:470:8:71a::"
echo "External IP:" $CLIENT_IPV4_ADDR > $LOG
if [ -n $CLIENT_IPV4_ADDR ]; then
echo "configuring tunnel" >> $LOG
ip tunnel add he-ipv6 mode sit remote $SERVER_IPV4_ADDR local $CLIENT_IPV4_ADDR ttl 255 2>> $LOG
ip link set he-ipv6 up 2>> $LOG
ip addr add $CLIENT_IPV6_ADDR/64 dev he-ipv6 2>> $LOG
ip route add ::/0 dev he-ipv6 2>> $LOG
ip -f inet6 addr
ip -6 addr add $ROUTED_64_ADDR"1/64" dev br0 2>> $LOG
echo "nameserver 2620:0:ccc::2" >> /tmp/resolv.dnsmasq
echo "nameserver 2620:0:ccd::2" >> /tmp/resolv.dnsmasq
killall radvd 2>> $LOG
echo "interface br0 {" > $RADVD_CONFIG
echo "AdvSendAdvert on;" >> $RADVD_CONFIG
echo "prefix "$ROUTED_64_ADDR"/64 {" >> $RADVD_CONFIG
echo "AdvOnLink on;" >> $RADVD_CONFIG
echo "AdvAutonomous on;" >> $RADVD_CONFIG
echo "AdvRouterAddr on;" >> $RADVD_CONFIG
echo "};" >> $RADVD_CONFIG
echo "};" >> $RADVD_CONFIG
echo "starting radvd" >> $LOG
radvd -C $RADVD_CONFIG 2>> $LOG &
fi
This should do it. Simply run the script manually if you want to have IPv6 applied immediately before reboot. Also be sure you chmod +x /jffs/etc/config/ipv6.startup
that file, otherwise it won't be executable.