I have installed the kernel 4.0.7 on my rpi2. But I can't find the document /proc/net/if_inet6
Try "sudo modprobe -v ipv6". Remember to add this module to /etc/modules for auto-loading at boot.