Changeset 1a26a9
- Timestamp:
- 09/26/09 11:42:32 (3 years ago)
- Branches:
- master
- Children:
- b17790
- Parents:
- c5bdf0
- git-author:
- Erik Ekman <yarrick@…> (09/26/09 11:42:32)
- git-committer:
- Erik Ekman <erik@…> (02/04/12 20:34:04)
- Files:
-
- 4 edited
-
CHANGELOG (modified) (1 diff)
-
man/iodine.8 (modified) (1 diff)
-
src/client.c (modified) (1 diff)
-
src/iodine.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
CHANGELOG
rc5bdf0 r1a26a9 29 29 Patch by Anne Bezemer, merge help by logix. 30 30 - Merged low-latency patch from Anne Bezemer, fixes #76. 31 - Resolve client nameserver argument (except on win32),#82.31 - Resolve client nameserver argument if given as hostname, fixes #82. 32 32 33 33 2009-06-01: 0.5.2 "WifiFree" -
man/iodine.8
rc5bdf0 r1a26a9 222 222 The nameserver to use to relay the dns traffic. This can be any relaying 223 223 nameserver or the server running iodined if reachable. This field can be 224 given as an IP address, or as a hostname (except on Win32 currently). 225 This argument is optional, and if not specified a nameserver will be read 226 from the 224 given as an IP address, or as a hostname. This argument is optional, and 225 if not specified a nameserver will be read from the 227 226 .I /etc/resolv.conf 228 227 file. -
src/client.c
rc5bdf0 r1a26a9 146 146 147 147 if (inet_aton(cp, &addr) != 1) { 148 /* try resolving if a domain is given */ 149 struct hostent *host; 150 const char *err; 151 host = gethostbyname(cp); 152 if (host != NULL && h_errno > 0) { 153 int i = 0; 154 while (host->h_addr_list[i] != 0) { 155 addr = *(struct in_addr *) host->h_addr_list[i++]; 156 fprintf(stderr, "Resolved %s to %s\n", cp, inet_ntoa(addr)); 157 goto setaddr; 158 } 159 } 148 160 #ifndef WINDOWS32 149 /* MinGW only supports getaddrinfo on WinXP and higher.. 150 * so turn it off in windows for now 151 * 152 * try resolving if a domain is given */ 153 struct addrinfo *addrinfo; 154 struct addrinfo *res; 155 if (getaddrinfo(cp, NULL, NULL, &addrinfo) == 0) { 156 struct sockaddr_in *inaddr; 157 for (res = addrinfo; res != NULL; res = res->ai_next) { 158 inaddr = (struct sockaddr_in *) res->ai_addr; 159 addr = inaddr->sin_addr; 161 err = hstrerror(h_errno); 162 #else 163 { 164 DWORD wserr = WSAGetLastError(); 165 switch (wserr) { 166 case WSAHOST_NOT_FOUND: 167 err = "Host not found"; 160 168 break; 161 } 162 freeaddrinfo(addrinfo); 163 } else 164 #endif 165 errx(1, "error parsing nameserver address: '%s'", cp); 166 } 167 169 case WSANO_DATA: 170 err = "No data record found"; 171 break; 172 default: 173 err = "Unknown error"; 174 break; 175 } 176 } 177 #endif /* !WINDOWS32 */ 178 errx(1, "error resolving nameserver '%s': %s", cp, err); 179 } 180 181 setaddr: 168 182 memset(&nameserv, 0, sizeof(nameserv)); 169 183 nameserv.sin_family = AF_INET; -
src/iodine.c
rc5bdf0 r1a26a9 90 90 fprintf(stderr, " -z context, to apply specified SELinux context after initialization\n"); 91 91 fprintf(stderr, " -F pidfile to write pid to a file\n"); 92 fprintf(stderr, "nameserver is the IP number/hostname of the relaying nameserver\n " 93 "(hostname not supported on win32). if absent, /etc/resolv.conf is used\n"); 92 fprintf(stderr, "nameserver is the IP number/hostname of the relaying nameserver. if absent, /etc/resolv.conf is used\n"); 94 93 fprintf(stderr, "topdomain is the FQDN that is delegated to the tunnel endpoint.\n"); 95 94
Note: See TracChangeset
for help on using the changeset viewer.
