summaryrefslogtreecommitdiffstats
path: root/src/net/udp/dhcp.c
Commit message (Collapse)AuthorAgeFilesLines
* [dhcp] Work around a bug in Altiris RDPMichael Brown2008-08-011-2/+2
| | | | | | | Altiris erroneously cares about the ordering of DHCP options, and will get confused if we don't construct them in the order it expects. This is observed (so far) only when attempting to deploy 64-bit Win2k3.
* [dhcp] Verify DHCP server source portMichael Brown2008-07-101-16/+45
| | | | | | Verifying server ID and DHCP transaction ID is insufficient to differentiate between DHCPACK and ProxyDHCPACK when the DHCP server and Proxy DHCP server are the same machine.
* [dhcp] Verify server identifier on ProxyDHCPACKsMichael Brown2008-07-011-7/+25
| | | | | | | | | | Perform the same test for a matching DHCP_SERVER_IDENTIFIER on ProxyDHCPACKs as we do for DHCPACKs. Otherwise, a retransmitted DHCPACK can end up being treated as the ProxyDHCPACK. I have a vague and unsettling memory that this test was deliberately omitted, but I can't remember why, and can't find anything in the VC logs.
* [dhcp] Do not transition to DHCPREQUEST without a valid DHCPOFFERMichael Brown2008-06-111-1/+1
| | | | | | A missing test for dhcp->dhcpoffer in dhcp_timer_expired() was causing the client to transition to DHCPREQUEST after timing out on waiting for ProxyDHCP even if no DHCPOFFERs had been received.
* [DHCP] Add "dhcp-server" setting to help end-user diagnosticsMichael Brown2008-06-051-0/+8
|
* [Settings] Expose SMBIOS via settings APIMichael Brown2008-03-281-2/+3
| | | | In particular, expose the system UUID as a setting ("smbios/uuid").
* [DHCP] Add support for ProxyDHCP requestsMichael Brown2008-03-271-345/+546
| | | | | | | | | | | | | | | | The PXE spec is (as usual) unclear on precisely when ProxyDHCPREQUESTs should be issued. We adapt the following, slightly paranoid approach: If an offer contains an IP address, then it is a normal DHCPOFFER. If an offer contains an option #60 "PXEClient", then it is a ProxyDHCPOFFER. Note that the same packet can be both a normal DHCPOFFER and a ProxyDHCPOFFER. After receiving the normal DHCPACK, if we have received a ProxyDHCPOFFER, we unicast a ProxyDHCPREQUEST back to the ProxyDHCP server on port 4011. If we time out waiting for a ProxyDHCPACK, we treat this as a non-fatal error.
* [DHCP] Save precious packet-aligned memory by copying DHCP responsesMichael Brown2008-03-261-33/+16Star
| | | | | Copy DHCP responses to a standard malloc()ed buffer, rather than retaining the I/O buffer that they arrived in.
* [Settings] Remove assumption that all settings have DHCP tag valuesMichael Brown2008-03-251-181/+122Star
| | | | | | | | | | | | Allow for settings to be described by something other than a DHCP option tag if desirable. Currently used only for the MAC address setting. Separate out fake DHCP packet creation code from dhcp.c to fakedhcp.c. Remove notion of settings from dhcppkt.c. Rationalise dhcp.c to use settings API only for final registration of the DHCP options, rather than using {store,fetch}_setting throughout.
* [DHCP] Fix DHCP state confusion.Michael Brown2008-03-251-2/+5
| | | | | DHCP code was using an incorrect check for whether to construct a DHCPDISCOVER or DHCPREQUEST packet.
* [Settings] copy_settings() should not fail if some settings are missing!Michael Brown2008-03-241-18/+54
|
* [DHCP] Fix up fake-packet creation as used by PXENV_GET_CACHED_INFOMichael Brown2008-03-231-37/+107
| | | | | | | | | | | Add dedicated functions create_dhcpdiscover(), create_dhcpack() and create_proxydhcpack() for use by external code such as the PXE preboot code. Register ProxyDHCP options under the global scope "proxydhcp". Unregister previously-acquired DHCP and ProxyDHCP settings when DHCP succeeds.
* [DHCP] FIXME: quick temporary settings fix, needs update for new APIMarty Connor2008-03-221-0/+4
|
* [Settings] DHCP is now working using the new settings API.Michael Brown2008-03-211-3/+4
|
* [Settings] Migrate DHCP and NVO code to the new settings API (untested)Michael Brown2008-03-211-437/+197Star
|
* [Settings] Use a settings applicator to configure IPv4 routes.Michael Brown2008-03-211-43/+0Star
|
* Modify gPXE core and drivers to work with the new timer subsystemAlexey Zaytsev2008-03-021-0/+1
| | | | Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
* [DHCP] Fix RFC4390 client identifier constructions.Michael Brown2008-02-271-1/+1
| | | | | | RFC 4390 provides for the DHCP client identifier to contain the link-layer hardware type and MAC address when the MAC address exceeds 16 bytes. However, the hardware type field is only 8 bits; we were assuming 16 bits.
* Make seek information part of the xfer metadata, rather than an entirelyMichael Brown2008-01-081-1/+1
| | | | | | | separate xfer method. Add missing .alloc_iob entries to several xfer_interface_operations structures.
* When the DHCP file/sname fields are empty, don't allow them to overrideMichael Brown2008-01-071-6/+8
| | | | their equivalent DHCP-option-specified values.
* Various warnings fixups for OpenBSD with gcc-3.3.5.Michael Brown2007-12-071-1/+1
|
* Allow DHCP server to instruct gPXE to ignore ProxyDHCP (which willMichael Brown2007-11-211-8/+16
| | | | | | also avoid waiting for ProxyDHCP offers). Also reduce the ProxyDHCP timeout, because it's already irritating me.
* Add ProxyDHCP support.Michael Brown2007-11-211-25/+54
|
* Remove some assumptions about DHCP obtaining only a single options block.Michael Brown2007-11-211-3/+7
|
* Add PXE-required DHCP options to DHCPDISCOVER and DHCPREQUEST packets.Michael Brown2007-11-211-10/+25
|
* Add UUID to DHCP request as option 97 (if available).Michael Brown2007-11-211-0/+13
|
* Use RFC4390 whenever hardware address exceeds 16 bytes; this allows usMichael Brown2007-09-211-2/+36
| | | | to construct DHCP packets suitable for Infiniband.
* Bugfix: DHCP message type should be a one-byte option... (d'oh)Michael Brown2007-09-131-2/+1Star
|
* Use start_timer_nodelay() in protocols which rely on the retry timerMichael Brown2007-08-131-1/+1
| | | | | to generate the initial transmission; this cuts off around 0.3s per instantiated connection.
* Add FEATURE() macro, plus code to display features at startup time,Michael Brown2007-08-021-0/+15
| | | | | and generate DHCP options to indicate features to DHCP server (and to PXE NBPs).
* Add identifier for the network device into the DHCP request.Michael Brown2007-07-311-0/+25
|
* Centralise construction of the DHCP request and response packets.Michael Brown2007-07-311-37/+104
|
* Separate the "is data ready" function of xfer_seek() into anMichael Brown2007-07-081-0/+1
| | | | | xfer_window() function, which can return a scalar rather than a boolean.
* Kill off unused request() method in data-xfer interface.Michael Brown2007-07-081-1/+0Star
|
* convert to zallocHolger Lubitz2007-07-061-2/+1Star
|
* Apply global DHCP options when register_dhcp_options() is called. DoMichael Brown2007-07-061-7/+0Star
| | | | not apply DHCP options in dhcp_configure_netdev().
* Add concept of DHCP option applicators.Michael Brown2007-07-051-28/+6Star
|
* Can't use strncpy() to copy strings that aren't NUL-terminated toMichael Brown2007-07-011-2/+8
| | | | begin with.
* Don't build option-overloaded packets; they just confuse people (ISCMichael Brown2007-06-301-31/+11Star
| | | | DHCPD and Windows RIS in particular).
* Set current working URI based on TFTP server specified by DHCP.Michael Brown2007-06-281-0/+15
|
* Add dhcp_configure_netdev()Michael Brown2007-06-281-3/+61
|
* Forgot to set initial session state. Now works!Michael Brown2007-06-281-0/+1
|
* Kill off job::start() (it was only ever added as part of an abortedMichael Brown2007-06-281-1/+0Star
| | | | attempt at triggering TCP-related protocols to start).
* Update DHCP to use data-xfer interface (not yet tested).Michael Brown2007-06-281-97/+187
|
* Kill off hotplug.h and just make net devices normal reference-countedMichael Brown2007-06-271-20/+5Star
| | | | | | structures. DHCP still broken and #if 0'd out.
* hoffmeis: Preparations for syslog support (LOGSERVER in DHCP, linewiseAnselm Martin Hoffmeister2007-04-091-1/+1
| | | | output buffering defintions and the like)
* Improved debuggingMichael Brown2007-01-161-15/+24
|
* Gave asynchronous operations approximate POSIX signal semantics. ThisMichael Brown2007-01-151-9/+8Star
| | | | | | | | | | | will enable us to cascade async operations, which is necessary in order to properly support DNS. (For example, an HTTP request may have to redirect to a new location and will have to perform a new DNS lookup, so we can't just rely on doing the name lookup at the time of parsing the initial URL). Anything other than HTTP is probably broken right now; I'll fix the others up asap.
* DHCP transmits via specified net device, so no need to create a dummyMichael Brown2007-01-101-2/+2
| | | | routing table entry just to fool ipv4.c any more.
* A DHCP session holds a persistent reference to a network deviceMichael Brown2007-01-041-0/+24
|