Ipv6 fixes and tests

See commit comments