Index: bootp.c                                                                   
===================================================================              
--- bootp.c     (revisao 16180)                                                  
+++ bootp.c     (copia de trabalho)                                              
@@ -132,7 +132,7 @@                                                              
     struct mbuf *m;                                                             
     struct bootp_t *rbp;                                                        
     struct sockaddr_in saddr, daddr;                                            
-    struct in_addr dns_addr_dhcp;                                               
+    struct in_addr dns_addr_dhcp, tftp_server;                                  
     int dhcp_msg_type, val;                                                     
     uint8_t *q;                                                                 
     struct in_addr requested_ip; /* the requested IP in DHCPREQUEST */          
@@ -200,11 +200,6 @@                                                             
         }                                                                       
     }                                                                           
                                                                                 
-    if (   tftp_prefix                                                          
-        && RTDirExists(tftp_prefix)                                             
-        && bootp_filename)                                                      
-        RTStrPrintf((char*)rbp->bp_file, sizeof(rbp->bp_file), "%s", bootp_filename);
-                                                                                     
     saddr.sin_addr.s_addr = htonl(ntohl(special_addr.s_addr) | CTL_ALIAS);           
     saddr.sin_port = htons(BOOTP_SERVER);                                            

@@ -218,6 +213,16 @@

     rbp->bp_yiaddr = daddr.sin_addr; /* Client IP address */
     rbp->bp_siaddr = saddr.sin_addr; /* Server IP address */
+    if (tftp_prefix
+        && bootp_filename) {
+        if (RTDirExists(tftp_prefix)) {
+            RTStrPrintf((char*)rbp->bp_file, sizeof(rbp->bp_file), "%s", bootp_filename);
+        } else if (inet_aton(tftp_prefix, &tftp_server)) {
+            RTStrPrintf((char*)rbp->bp_file, sizeof(rbp->bp_file), "%s", bootp_filename);
+            /* Replace Server IP with external TFTP Server */
+            rbp->bp_siaddr = tftp_server; /* Next Server IP address*/
+        }
+    }

     q = rbp->bp_vend;
     memcpy(q, rfc1533_cookie, 4);
