5359edc160de518d8e43fdd3448365c15b912c3c galt Mon Jul 22 11:48:10 2019 -0700 Added ipv6 support. Listening processes us hybrid dual stack feature of OS to simplify implementation and use a single listening socket. Works with both TCP and UDP. Parasol working. geoIp also updated and ready for IPv6. Should be invisible to most users, while providing connections via ipv6 where available. Supports both ipv4 and ipv6. diff --git src/hg/lib/web.c src/hg/lib/web.c index 2e8fc08..055826e 100644 --- src/hg/lib/web.c +++ src/hg/lib/web.c @@ -1562,31 +1562,31 @@ void checkForGeoMirrorRedirect(struct cart *cart) // Implement Geo/IP based redirection. { char *thisNodeStr = geoMirrorNode(); if (thisNodeStr) // if geo-mirroring is enabled { char *redirectCookie = findCookieData("redirect"); char *redirect = cgiOptionalString("redirect"); // if we're not already redirected if (redirect == NULL && redirectCookie == NULL) { int thisNode = sqlUnsigned(thisNodeStr); struct sqlConnection *centralConn = hConnectCentral(); char *ipStr = cgiRemoteAddr(); - int node = defaultNode(centralConn, ipStr); + int node = geoMirrorDefaultNode(centralConn, ipStr); // if our node is not the node that's closest. if (thisNode != node) { char *geoSuffix = cfgOptionDefault("browser.geoSuffix",""); char query[1056]; sqlSafef(query, sizeof query, "select domain from gbNode%s where node = %d", geoSuffix, node); char *newDomain = sqlQuickString(centralConn, query); char *oldDomain = cgiServerName(); char *port = cgiServerPort(); char *uri = cgiRequestUri(); char *sep = strchr(uri, '?') ? "&" : "?"; int newUriSize = strlen(uri) + 1024; char *newUri = needMem(newUriSize); char *oldUri = needMem(newUriSize);