mirror of
https://github.com/ipxe/ipxe
synced 2025-12-19 11:00:27 +03:00
Apply global DHCP options when register_dhcp_options() is called. Do
not apply DHCP options in dhcp_configure_netdev().
This commit is contained in:
@@ -289,6 +289,9 @@ void register_dhcp_options ( struct dhcp_option_block *options ) {
|
||||
}
|
||||
dhcpopt_get ( options );
|
||||
list_add_tail ( &options->list, &existing->list );
|
||||
|
||||
/* Apply all registered DHCP options */
|
||||
apply_global_dhcp_options();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -609,3 +612,12 @@ int apply_dhcp_options ( struct dhcp_option_block *options ) {
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply global DHCP options
|
||||
*
|
||||
* @ret rc Return status code
|
||||
*/
|
||||
int apply_global_dhcp_options ( void ) {
|
||||
return apply_dhcp_options ( NULL );
|
||||
}
|
||||
|
||||
@@ -855,12 +855,5 @@ int dhcp_configure_netdev ( struct net_device *netdev,
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* Apply other DHCP options */
|
||||
if ( ( rc = apply_dhcp_options ( options ) ) != 0 ) {
|
||||
DBG ( "Could not apply %s DHCP result options: %s\n",
|
||||
netdev->name, strerror ( rc ) );
|
||||
return rc;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user