--- profiles/hostmaster/modules/hosting/hosting.inc.orig	2011-11-07 13:08:48.000000000 +0100
+++ profiles/hostmaster/modules/hosting/hosting.inc	2011-11-07 13:36:41.000000000 +0100
@@ -17,17 +17,7 @@
  *   TRUE is the $hostname is a valid IP address, FALSE otherwise.
  */
 function _hosting_valid_ip($hostname) {
-  //TODO : provide IPv6 support
-  $parts = explode('.', $hostname);
-  if (sizeof($parts) != 4) {
-    return FALSE;
-  }
-  foreach ($parts as $part) {
-    if (((int) $part < 0) || ((int) $part > 255)) {
-      return FALSE;
-    }
-  }
-  return TRUE;
+  return is_string(inet_pton($hostname));
 }
 
 /**
