Index: /trunk/src/VBox/Devices/Network/slirp/ip_output.c
===================================================================
--- /trunk/src/VBox/Devices/Network/slirp/ip_output.c	(revision 19845)
+++ /trunk/src/VBox/Devices/Network/slirp/ip_output.c	(revision 19846)
@@ -49,5 +49,9 @@
 {
     int i;
-   /* temporary do for dhcp client */ 
+   /* @todo (r - vasily) to quick ramp up on routing rails 
+    * we use information from DHCP server leasings, this 
+    * code couldn't detect any changes in network topology 
+    * and should be borrowed from other places 
+    */
     for(i = 0; i < NB_ADDR; i++)
     {
@@ -79,4 +83,9 @@
     register int hlen = sizeof(struct ip );
     int len, off, error = 0;
+#ifdef VBOX_WITHOUT_SLIRP_CLIENT_ETHER
+    extern uint8_t zerro_ethaddr[ETH_ALEN];
+    struct ethhdr *eh;
+    uint8_t *eth_dst;
+#endif
 
     DEBUG_CALL("ip_output");
@@ -117,4 +126,14 @@
     }
 #endif
+#ifdef VBOX_WITHOUT_SLIRP_CLIENT_ETHER
+      /* Current TCP/IP stack hasn't routing information at 
+       * all so we need to calculate destination ethernet address 
+       */
+     eh = (struct ethhdr *)MBUF_HEAD(m);
+     if (memcmp(eh->h_source, zerro_ethaddr, ETH_ALEN) == 0) {
+         eth_dst = rt_lookup_in_cache(pData, ip->ip_dst.s_addr); 
+     }
+       
+#endif
 
     /*
@@ -128,17 +147,6 @@
         ip->ip_sum = cksum(m, hlen);
 #ifdef VBOX_WITHOUT_SLIRP_CLIENT_ETHER
-        /* Current TCP/IP stack hasn't routing information at 
-         * all so we need to calculate destination ethernet address 
-         */
-        {
-            extern uint8_t zerro_ethaddr[ETH_ALEN];
-            struct ethhdr *eh;
-            eh = (struct ethhdr *)MBUF_HEAD(m);
-            if (memcmp(eh->h_source, zerro_ethaddr, ETH_ALEN) == 0) {
-                char *dst = rt_lookup_in_cache(pData, ip->ip_dst.s_addr); 
-                if (dst != NULL) {
-                    memcpy(eh->h_source, dst, ETH_ALEN); 
-                }
-            }
+        if (eth_dst != NULL) {
+            memcpy(eh->h_source, eth_dst, ETH_ALEN); 
         }
 #endif
@@ -178,8 +186,4 @@
         for (off = hlen + len; off < (u_int16_t)ip->ip_len; off += len)
         {
-#ifdef VBOX_WITHOUT_SLIRP_CLIENT_ETHER
-            struct ethhdr *eh0;
-            struct ethhdr *eh;
-#endif
             register struct ip *mhip;
             m = m_get(pData);
@@ -190,12 +194,14 @@
                 goto sendorfree;
             }
-#ifdef VBOX_WITH_NAT_SERVICE
-            eh0 = (struct ethhdr *)MBUF_HEAD(m0);
-            eh = (struct ethhdr *)MBUF_HEAD(m);
-            memcpy(eh->h_source, eh0->h_source, ETH_ALEN);
-#endif
             m_adj(m, if_maxlinkhdr);
             mhip = mtod(m, struct ip *);
             *mhip = *ip;
+#ifdef VBOX_WITHOUT_SLIRP_CLIENT_ETHER
+            /* we've calculated eth_dst for first packet */
+            eh = (struct ethhdr *)MBUF_HEAD(m);
+            if (eth_dst != NULL) {
+                memcpy(eh->h_source, eth_dst, ETH_ALEN); 
+            }
+#endif
 
 #if 0 /* No options */
