DHCP: get BOOTP/DHCP to work
authorSandeep Paulraj <s-paulraj@ti.com>
Fri, 12 Nov 2010 05:45:26 +0000 (00:45 -0500)
committerSandeep Paulraj <s-paulraj@ti.com>
Fri, 12 Nov 2010 05:45:26 +0000 (00:45 -0500)
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
src/driver/eth/ip.c

index 5ca8fbb8df91172a248fdd412ed4b0da02ada98a..fb61436e4e84cb904da1bf5f3cf0bd206cb59738 100644 (file)
@@ -296,8 +296,9 @@ Int32 ip_receive (IPHDR* ptr_iphdr, Int32 num_bytes)
     /* We accept only the following packets:-
      *  a) Destination Address is the address of the NET Boot module. 
      *  b) Destination Address is the a special 255.255.255.255 address for BOOTP Reply*/
-    if ((ptr_iphdr->IPDst != netmcb.net_device.ip_address) && (ptr_iphdr->IPDst != 0xFFFFFFFF))
-        return -1;
+    if (netmcb.net_device.use_bootp_server_ip == 0)
+       if ((ptr_iphdr->IPDst != netmcb.net_device.ip_address) && (ptr_iphdr->IPDst != 0xFFFFFFFF))
+               return -1;
 
     /* Pass the packet to the layer4 receive handlers. */
     switch (ptr_iphdr->Protocol)