Changeset 39773 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Jan 17, 2012 2:42:36 AM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 75718
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/libalias/alias_dns.c
r39766 r39773 30 30 #define DNS_CONTROL_PORT_NUMBER 53 31 31 /* see RFC 1035(4.1.1) */ 32 #pragma pack(1) 32 33 union dnsmsg_header 33 34 { 34 35 struct 35 36 { 36 u nsigned id:16;37 uint16_t id; 37 38 unsigned rd:1; 38 39 unsigned tc:1; … … 48 49 uint16_t arcount; 49 50 } X; 50 uint16_t raw[ 6];51 uint16_t raw[5]; 51 52 }; 53 #pragma pack() 52 54 AssertCompileSize(union dnsmsg_header, 12); 53 55 … … 99 101 { 100 102 int i; 101 103 LogFlowFunc(("ENTER: pszQname:%s\n", pszQname)); 104 pHdr->X.qr = 1; /* response */ 102 105 if (!pHostent) 103 106 { 104 pHdr->X.qr = 1; /* response */105 107 pHdr->X.aa = 1; 106 108 pHdr->X.rd = 1; … … 189 191 pIp->ip_len = htons(packet_len); 190 192 } 193 LogFlowFuncLeave(); 191 194 } 192 195 … … 204 207 struct udphdr *udp = NULL; 205 208 union dnsmsg_header *pHdr = NULL; 209 LogFlowFuncEnter(); 206 210 NOREF(la); 207 211 NOREF(ah); … … 210 214 211 215 if (pHdr->X.qr == 1) 216 { 217 LogFlowFunc(("pHdr(X.qr:%d, raw:%RX16)\n", pHdr->X.qr, pHdr->raw)); 218 LogFlowFuncLeave(); 212 219 return 0; /* this is respose */ 220 } 213 221 214 222 memset(pszCname, 0, sizeof(pszCname)); … … 223 231 fMultiWarn = true; 224 232 } 233 LogFlowFuncLeave(); 225 234 return 1; 226 235 } … … 263 272 pIp->ip_sum = 0; 264 273 pIp->ip_sum = LibAliasInternetChecksum(la, (uint16_t *)pIp, pIp->ip_hl << 2); 274 LogFlowFuncLeave(); 265 275 return 0; 266 276 } … … 394 404 if (!strcmp(pDNSMapingEntry->pszCName, *pszAlias)) 395 405 { 396 406 /* 407 * we need add mappings for real host name, instead of using alias. 408 * DNS server doesn't return alias list on real name request. 409 */ 397 410 PDNSMAPPINGENTRY pDnsMapping = RTMemAllocZ(sizeof(DNSMAPPINGENTRY)); 398 411 fMatch = true;
Note:
See TracChangeset
for help on using the changeset viewer.