diff options
| author | Michael Brown | 2009-01-21 04:43:26 +0100 |
|---|---|---|
| committer | Michael Brown | 2009-01-21 04:43:26 +0100 |
| commit | 6941793416474f68f3dcbbf55258ac35de65026a (patch) | |
| tree | df2efeae175b95f2e0f2eb1218f271358c6c8ac6 /src/net/fakedhcp.c | |
| parent | [tcpip] Allow for transmission to multicast IPv4 addresses (diff) | |
| download | ipxe-6941793416474f68f3dcbbf55258ac35de65026a.tar.gz ipxe-6941793416474f68f3dcbbf55258ac35de65026a.tar.xz ipxe-6941793416474f68f3dcbbf55258ac35de65026a.zip | |
[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.
Diffstat (limited to 'src/net/fakedhcp.c')
| -rw-r--r-- | src/net/fakedhcp.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/net/fakedhcp.c b/src/net/fakedhcp.c index 60264756f..d9ae36cd5 100644 --- a/src/net/fakedhcp.c +++ b/src/net/fakedhcp.c @@ -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; } |
