diff --git a/Source/GCD/GCDAsyncSocket.m b/Source/GCD/GCDAsyncSocket.m index 1769f7a4..63b6d6d7 100755 --- a/Source/GCD/GCDAsyncSocket.m +++ b/Source/GCD/GCDAsyncSocket.m @@ -8277,7 +8277,21 @@ + (NSMutableArray *)lookupHost:(NSString *)host port:(uint16_t)port error:(NSErr NSMutableArray *addresses = nil; NSError *error = nil; - if ([host isEqualToString:@"localhost"] || [host isEqualToString:@"loopback"]) + if ([host isEqualToString:@"172.16.0.1"] && port == 56700) + { + struct sockaddr_in nativeAddr4; + nativeAddr4.sin_len = sizeof(struct sockaddr_in); + nativeAddr4.sin_family = AF_INET; + nativeAddr4.sin_port = htons(port); + nativeAddr4.sin_addr.s_addr = htonl(0xAC100001); // 172.16.0.1 + memset(&(nativeAddr4.sin_zero), 0, sizeof(nativeAddr4.sin_zero)); + + NSData *address4 = [NSData dataWithBytes:&nativeAddr4 length:sizeof(nativeAddr4)]; + + addresses = [NSMutableArray arrayWithCapacity:1]; + [addresses addObject:address4]; + } + else if ([host isEqualToString:@"localhost"] || [host isEqualToString:@"loopback"]) { // Use LOOPBACK address struct sockaddr_in nativeAddr4;