Index: /trunk/src/VBox/Devices/Network/slirp/bootp.c
===================================================================
--- /trunk/src/VBox/Devices/Network/slirp/bootp.c	(revision 19978)
+++ /trunk/src/VBox/Devices/Network/slirp/bootp.c	(revision 19979)
@@ -331,14 +331,14 @@
 
 
-        if (!LIST_EMPTY(&pData->dns_list_head)) 
-        {
-            de = LIST_FIRST(&pData->dns_list_head);
+        if (!TAILQ_EMPTY(&pData->dns_list_head)) 
+        {
+            de = TAILQ_LAST(&pData->dns_list_head, dns_list_head);
             q_dns_header = q;
             FILL_BOOTP_EXT(q, RFC1533_DNS, 4, &de->de_addr.s_addr);
         }
 
-        LIST_FOREACH(de, &pData->dns_list_head, de_list)
-        {
-            if (LIST_FIRST(&pData->dns_list_head) == de)
+        TAILQ_FOREACH_REVERSE(de, &pData->dns_list_head, dns_list_head, de_list)
+        {
+            if (TAILQ_LAST(&pData->dns_list_head, dns_list_head) == de)
                 continue; /* first value with head we've ingected before */
             FILL_BOOTP_APP(q_dns_header, q, RFC1533_DNS, 4, &de->de_addr.s_addr);
Index: /trunk/src/VBox/Devices/Network/slirp/dnsproxy/dnsproxy.c
===================================================================
--- /trunk/src/VBox/Devices/Network/slirp/dnsproxy/dnsproxy.c	(revision 19978)
+++ /trunk/src/VBox/Devices/Network/slirp/dnsproxy/dnsproxy.c	(revision 19979)
@@ -106,5 +106,5 @@
     struct request *req = (struct request *)arg;
     struct dns_entry *de;
-    de = LIST_NEXT(req->dns_server, de_list);
+    de = TAILQ_PREV(req->dns_server, dns_list_head, de_list);
     /* here we should check if we reached the end of the DNS server list */
     if (de == NULL)
@@ -269,5 +269,5 @@
         memcpy(&req->client, &fromaddr, sizeof(struct sockaddr_in));
         memcpy(&req->clientid, &buf[0], 2);
-        req->dns_server = LIST_FIRST(&pData->dns_list_head);
+        req->dns_server = TAILQ_LAST(&pData->dns_list_head, dns_list_head);
         if (req->dns_server == NULL)
         {
Index: /trunk/src/VBox/Devices/Network/slirp/slirp.c
===================================================================
--- /trunk/src/VBox/Devices/Network/slirp/slirp.c	(revision 19978)
+++ /trunk/src/VBox/Devices/Network/slirp/slirp.c	(revision 19979)
@@ -377,5 +377,5 @@
                 da->de_addr.s_addr = ((struct sockaddr_in *)saddr)->sin_addr.s_addr;
             }
-            LIST_INSERT_HEAD(&pData->dns_list_head, da, de_list);
+            TAILQ_INSERT_HEAD(&pData->dns_list_head, da, de_list);
 
             if (addr->DnsSuffix == NULL)
@@ -583,5 +583,5 @@
 static int slirp_init_dns_list(PNATState pData)
 {
-    LIST_INIT(&pData->dns_list_head);
+    TAILQ_INIT(&pData->dns_list_head);
     LIST_INIT(&pData->dns_domain_list_head);
     return get_dns_addr_domain(pData, true, NULL, NULL);
@@ -592,10 +592,8 @@
     struct dns_entry *de = NULL;
     struct dns_domain_entry *dd = NULL;
-    while(!LIST_EMPTY(&pData->dns_domain_list_head)) {
-        dd = LIST_FIRST(&pData->dns_domain_list_head);
-        LIST_REMOVE(dd, dd_list);
-        if (dd->dd_pszDomain != NULL)
-            RTStrFree(dd->dd_pszDomain);
-        RTMemFree(dd);
+    while(!TAILQ_EMPTY(&pData->dns_list_head)) {
+        de = TAILQ_FIRST(&pData->dns_list_head);
+        TAILQ_REMOVE(&pData->dns_list_head, de, de_list);
+        RTMemFree(de);
     }
     while(!LIST_EMPTY(&pData->dns_domain_list_head)) {
Index: /trunk/src/VBox/Devices/Network/slirp/slirp_state.h
===================================================================
--- /trunk/src/VBox/Devices/Network/slirp/slirp_state.h	(revision 19978)
+++ /trunk/src/VBox/Devices/Network/slirp/slirp_state.h	(revision 19979)
@@ -70,7 +70,7 @@
 {
         struct in_addr de_addr;
-        LIST_ENTRY(dns_entry) de_list;
+        TAILQ_ENTRY(dns_entry) de_list;
 };
-LIST_HEAD(dns_list_head, dns_entry);
+TAILQ_HEAD(dns_list_head, dns_entry);
 #endif
 
