dd-wrt and IPv6

I had a fun time with my dd-wrt device lately. It seems that it doesn’t give IPv6 router advertisement to my clients, let alone get an IPv6 address on its own. My fix was to add these two commands on startup (make sure that the IPv6 address you assign is in the same subnet as your router (my dd-wrt deals only with wireless, it is not my home router):

ip addr add 2001:xxx:xxx:b:/64 dev br0
ip -6 ro add default via 2001:xxx:xxx:b::1
radvd -C /tmp/radvd.conf

Onto the radvd.conf front, this is my setup:

interface br0
AdvSendAdvert on;
prefix 2001:xxx:xxxx:b::/64
AdvOnLink on;
AdvAutonomous on;

And voila!

~# ping6 frlinux.net
PING frlinux.net: 56 data bytes
64 bytes : seq=0 ttl=56 time=30.131 ms
64 bytes : seq=1 ttl=56 time=28.834 ms
64 bytes : seq=2 ttl=56 time=29.812 ms
64 bytes : seq=3 ttl=56 time=29.507 ms