- /* If there is a slash, but we didn't request a (optional) netmask,
- we return failure, as we do if the mask isn't a pure numerical value,
- or if it is negative. The actual length is checked later, once we know
- the address family. */
- if (slash = Ustrchr(ip_addr, '/'))
+int
+string_is_ip_addressX(const uschar * ip_addr, int * maskptr, const uschar ** errp)
+{
+uschar * slash, * percent, * endp = NULL;
+long int mask = 0;
+const uschar * addr = NULL;
+int af;
+union { /* we do not need this, but inet_pton() needs a place for storage */
+ struct in_addr sa4;
+ struct in6_addr sa6;
+} sa;
+
+/* If there is a slash, but we didn't request a (optional) netmask,
+we return failure, as we do if the mask isn't a pure numerical value,
+or if it is negative. The actual length is checked later, once we know
+the address family. */
+if (slash = Ustrchr(ip_addr, '/'))