- Send DHCP discover after loading the configuration so we have valid options

- Fixes erratic behavior with certain DHCP servers

svn path=/trunk/; revision=43678
This commit is contained in:
Cameron Gutman 2009-10-22 00:55:45 +00:00
parent 3a16c5a061
commit ce81b8dba4

View file

@ -199,9 +199,7 @@ BOOL PrepareAdapterForService( PDHCP_ADAPTER Adapter ) {
Adapter->DhclientInfo.name,
Adapter->BindStatus));
add_protocol(Adapter->DhclientInfo.name, Adapter->DhclientInfo.rfdesc, got_one, &Adapter->DhclientInfo);
Adapter->DhclientInfo.client->state = S_INIT;
state_reboot(&Adapter->DhclientInfo);
}
if( IPAddress ) free( IPAddress );
@ -331,6 +329,15 @@ BOOLEAN AdapterDiscover() {
read_client_conf(&Adapter->DhclientInfo);
if (Adapter->DhclientInfo.client->state == S_INIT)
{
add_protocol(Adapter->DhclientInfo.name,
Adapter->DhclientInfo.rfdesc,
got_one, &Adapter->DhclientInfo);
state_init(&Adapter->DhclientInfo);
}
InsertTailList( &AdapterList, &Adapter->ListEntry );
} else { free( Adapter ); Adapter = 0; }
} else { free( Adapter ); Adapter = 0; }