mirror of
https://github.com/ipxe/ipxe
synced 2025-12-26 09:32:33 +03:00
[dhcp] Add preliminary support for PXE Boot Servers
Some PXE configurations require us to perform a third DHCP transaction (in addition to the real DHCP transaction and the ProxyDHCP transaction) in order to retrieve information from a "Boot Server". This is an experimental implementation, since the actual behaviour is not well specified in the PXE spec.
This commit is contained in:
@@ -176,6 +176,7 @@ int create_fakeproxydhcpack ( struct net_device *netdev,
|
||||
void *data, size_t max_len ) {
|
||||
struct dhcp_packet dhcppkt;
|
||||
struct settings *settings;
|
||||
struct settings *bs_settings;
|
||||
int rc;
|
||||
|
||||
/* Identify ProxyDHCP settings */
|
||||
@@ -200,5 +201,15 @@ int create_fakeproxydhcpack ( struct net_device *netdev,
|
||||
return rc;
|
||||
}
|
||||
|
||||
/* Merge in BootServerDHCP options, if present */
|
||||
bs_settings = find_settings ( BSDHCP_SETTINGS_NAME );
|
||||
if ( bs_settings ) {
|
||||
if ( ( rc = copy_settings ( &dhcppkt, bs_settings ) ) != 0 ) {
|
||||
DBG ( "Could not set BootServerDHCPACK settings: "
|
||||
"%s\n", strerror ( rc ) );
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user