Changeset 30921 in vbox
- Timestamp:
- Jul 20, 2010 4:09:30 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/libalias/alias_dns.c
r28800 r30921 186 186 struct hostent *h = NULL; 187 187 char cname[255]; 188 int cname_len = 0; 188 189 189 190 struct udphdr *udp = NULL; … … 195 196 return 0; /* this is respose */ 196 197 198 memset(cname, 0, sizeof(cname)); 197 199 qw_qname = (char *)&hdr[1]; 198 200 Assert((ntohs(hdr->X.qdcount) == 1)); … … 207 209 208 210 QStr2CStr(qw_qname, cname, sizeof(cname)); 211 cname_len = RTStrNLen(cname, sizeof(cname)); 212 /* Some guests like win-xp adds _dot_ after host name 213 * and after domain name (not passed with host resolver) 214 * that confuses host resolver. 215 */ 216 if ( cname_len > 2 217 && cname[cname_len - 1] == '.' 218 && cname[cname_len - 2] == '.') 219 { 220 cname[cname_len - 1] = 0; 221 cname[cname_len - 2] = 0; 222 } 209 223 h = gethostbyname(cname); 210 224 fprintf(stderr, "cname:%s\n", cname);
Note:
See TracChangeset
for help on using the changeset viewer.