LWIP - Fix for dhcpd broadcast to work after boot

Dhcp only works if devices are configured with a broadcast source
address at the begining as it currently uses raw ip sockets and the
sockets sets the source address. It is a quick hack and proper hdcpd
fix is preferable
This commit is contained in:
Tomas Hruby 2011-04-07 07:44:27 +00:00
parent 0039e02339
commit b2c2dc72bc

View File

@ -411,7 +411,14 @@ void driver_up(const char * label, endpoint_t ep)
nic->state = DRV_IDLE;
if (!netif_add(&nic->netif, &ip_addr_none, &ip_addr_none, &ip_addr_none,
/*
* FIXME
*
* We set the initial ip to 0.0.0.0 to make dhcpd broadcasing work
* at the very begining. dhcp should use raw socket but it is a little
* tricy in the current dhcp implementation
*/
if (!netif_add(&nic->netif, &ip_addr_any, &ip_addr_none, &ip_addr_none,
nic, ethernetif_init, ethernet_input)) {
printf("LWIP : failed to add device /dev/%s\n", nic->name);
nic->drv_ep = NONE;