Improve ipmask_parse()'s handling of invalid IPv6 inputs.