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