Code

frontend, client: Properly support IPv6 when handling address strings.
[sysdb.git] / src / utils / os.c
index c94e271be545dfe1bf51ec70d34887fc73ff3a19..2b6a51460a67f89122dbee5ec7d75d70e2b3fe82 100644 (file)
@@ -319,7 +319,7 @@ sdb_resolve(int network, const char *address, struct addrinfo **res)
 
        if (address) {
                host = address;
-               port = strchr(host, ':');
+               port = strrchr(host, ':');
                if (port) {
                        *port = '\0';
                        ++port;