ipv6: properly calculate length