Fix use of rsplit for IPv6 addresses.