Index: /trunk/src/VBox/Devices/Network/slirp/libalias/alias_dns.c
===================================================================
--- /trunk/src/VBox/Devices/Network/slirp/libalias/alias_dns.c	(revision 39772)
+++ /trunk/src/VBox/Devices/Network/slirp/libalias/alias_dns.c	(revision 39773)
@@ -30,9 +30,10 @@
 #define DNS_CONTROL_PORT_NUMBER 53
 /* see RFC 1035(4.1.1) */
+#pragma pack(1)
 union dnsmsg_header
 {
     struct
     {
-        unsigned id:16;
+        uint16_t id;
         unsigned rd:1;
         unsigned tc:1;
@@ -48,6 +49,7 @@
         uint16_t arcount;
     } X;
-    uint16_t raw[6];
+    uint16_t raw[5];
 };
+#pragma pack()
 AssertCompileSize(union dnsmsg_header, 12);
 
@@ -99,8 +101,8 @@
 {
     int i;
-
+    LogFlowFunc(("ENTER: pszQname:%s\n", pszQname));
+    pHdr->X.qr = 1; /* response */
     if (!pHostent)
     {
-        pHdr->X.qr = 1; /* response */
         pHdr->X.aa = 1;
         pHdr->X.rd = 1;
@@ -189,4 +191,5 @@
         pIp->ip_len = htons(packet_len);
     }
+    LogFlowFuncLeave();
 }
 
@@ -204,4 +207,5 @@
     struct udphdr *udp = NULL;
     union dnsmsg_header *pHdr = NULL;
+    LogFlowFuncEnter();
     NOREF(la);
     NOREF(ah);
@@ -210,5 +214,9 @@
 
     if (pHdr->X.qr == 1)
+    {
+        LogFlowFunc(("pHdr(X.qr:%d, raw:%RX16)\n", pHdr->X.qr, pHdr->raw));
+        LogFlowFuncLeave();
         return 0; /* this is respose */
+    }
 
     memset(pszCname, 0, sizeof(pszCname));
@@ -223,4 +231,5 @@
             fMultiWarn = true;
         }
+        LogFlowFuncLeave();
         return 1;
     }
@@ -263,4 +272,5 @@
     pIp->ip_sum = 0;
     pIp->ip_sum = LibAliasInternetChecksum(la, (uint16_t *)pIp, pIp->ip_hl << 2);
+    LogFlowFuncLeave();
     return 0;
 }
@@ -394,5 +404,8 @@
             if (!strcmp(pDNSMapingEntry->pszCName, *pszAlias))
             {
-
+                /*
+                 * we need add mappings for real host name, instead of using alias.
+                 * DNS server doesn't return alias list on real name request.
+                 */
                 PDNSMAPPINGENTRY pDnsMapping = RTMemAllocZ(sizeof(DNSMAPPINGENTRY));
                 fMatch = true;
