david/ipxe
david
/
ipxe
Archived
1
0
Fork 0
Commit Graph

34 Commits

Author SHA1 Message Date
Michael Brown 626ccf76ea [legal] Relicense files under GPL2_OR_LATER_OR_UBDL
Relicence files with kind permission from the following contributors:

  Alex Williamson <alex.williamson@redhat.com>
  Eduardo Habkost <ehabkost@redhat.com>
  Greg Jednaszewski <jednaszewski@gmail.com>
  H. Peter Anvin <hpa@zytor.com>
  Marin Hannache <git@mareo.fr>
  Robin Smidsrød <robin@smidsrod.no>
  Shao Miller <sha0.miller@gmail.com>
  Thomas Horsten <thomas@horsten.com>

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-02 14:50:42 +00:00
Michael Brown ced4f8d1d3 [dhcp] Copy exactly the required length when resizing DHCP options
When resizing DHCP options, iPXE currently calculates the length to be
copied by subtracting the destination pointer from the end of buffer
pointer.  This works and guarantees not to write beyond the end of the
buffer, but may end up reading beyond the end of the buffer.

Fix by calculating the required length exactly.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-02-26 16:44:05 +00:00
Michael Brown c3b4860ce3 [legal] Update FSF mailing address in GPL licence texts
Suggested-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-07-20 19:55:45 +01:00
Michael Brown f5fd4dec3b [settings] Formalise notion of setting applicability
Expose a function setting_applies() to allow a caller to determine
whether or not a particular setting is applicable to a particular
settings block.

Restrict DHCP-backed settings blocks to accepting only DHCP-based
settings.

Restrict network device settings blocks to accepting only DHCP-based
settings and network device-specific settings such as "mac".

Inspired-by: Glenn Brown <glenn@myri.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-03-22 19:54:58 +00:00
Michael Brown 17d28f4877 [nvo] Allow resizing of non-volatile stored option blocks
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-01-19 13:52:48 +00:00
Michael Brown 17b6a3c506 [dhcp] Allow use of custom reallocation functions for DHCP option blocks
Allow functions other than realloc() to be used to reallocate DHCP
option block data, and specify the reallocation function at the time
of calling dhcpopt_init().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-01-11 21:24:40 +00:00
Michael Brown 310d46c1ed [dhcp] Rename length fields for DHCP options
Rename "len" to "used_len" and "max_len" to "alloc_len".

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2011-01-10 03:39:26 +00:00
Michael Brown 8406115834 [build] Rename gPXE to iPXE
Access to the gpxe.org and etherboot.org domains and associated
resources has been revoked by the registrant of the domain.  Work
around this problem by renaming project from gPXE to iPXE, and
updating URLs to match.

Also update README, LOG and COPYRIGHTS to remove obsolete information.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-04-19 23:43:39 +01:00
Shao Miller cf5e79adc9 [dhcp] Append new DHCP options versus prepend
Change the behaviour for adding DHCP options into a DHCP packet so
that we now append options, rather than insert them in front of
whatever options might already be present.

Apparently, the DHCP relay logic on a Nortel 470-48T layer 2 switch
cares about the order of DHCP options.  If we build a DHCP packet
pre-populated with some options, their order will now be preserved,
except for encapsulated options.

Signed-off-by: Marty Connor <mdc@etherboot.org>
2010-01-14 11:14:24 -05:00
Michael Brown c44a193d0d [legal] Add a selection of FILE_LICENCE declarations
Add FILE_LICENCE declarations to almost all files that make up the
various standard builds of gPXE.
2009-05-18 08:33:25 +01:00
Michael Brown 92d15eff30 [Settings] Remove assumption that all settings have DHCP tag values
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.
2008-03-25 20:46:16 +00:00
Michael Brown a462c96ffc [Settings] DHCP is now working using the new settings API. 2008-03-21 22:55:59 +00:00
Michael Brown 8afb36c3bc [Settings] Migrate DHCP and NVO code to the new settings API (untested) 2008-03-21 22:15:31 +00:00
Michael Brown bb32b8999c [DHCP] Kill off some no-longer-used DHCP functions 2008-03-21 00:50:12 +00:00
Michael Brown 1edbcd4246 [Settings] Use a settings applicator to set the default TFTP URI. 2008-03-21 00:26:29 +00:00
Michael Brown cf03304620 [Settings] Introduce settings applicators.
Convert DHCP option applicators in dns.c and iscsi.c to settings
applicators.

Kill off DHCP option applicators.
2008-03-20 23:15:48 +00:00
Michael Brown df868476e7 Various warnings fixups for OpenBSD with gcc-3.3.5. 2007-12-07 00:11:43 +00:00
Michael Brown fb809da2df Remove some assumptions about DHCP obtaining only a single options block. 2007-11-21 04:48:18 +00:00
Michael Brown 934b70d62c Apply global DHCP options when register_dhcp_options() is called. Do
not apply DHCP options in dhcp_configure_netdev().
2007-07-06 17:07:50 +01:00
Michael Brown 1567b69895 Add concept of DHCP option applicators. 2007-07-05 18:38:14 +01:00
Michael Brown 07dc294de8 Update DHCP to use data-xfer interface (not yet tested). 2007-06-27 23:20:36 +01:00
Michael Brown 73b09ecba6 Use stdio.h instead of vsprintf.h 2007-01-19 01:13:12 +00:00
Michael Brown a646e38f03 Use stdlib.h for malloc() instead of malloc.h. 2006-12-19 23:42:46 +00:00
Michael Brown db0ff1731f Fail gracefully when set_dhcp_option() is called with options==NULL. 2006-08-11 18:16:34 +00:00
Michael Brown b26806cf18 Add dhcp_snprintf() for extracting DHCP string options. 2006-07-20 14:13:11 +00:00
Michael Brown 00a1f000b1 Added dhcp_ipv4_option() and friends.
Added test code to configure the interface for IPv4 after DHCP.
2006-07-20 02:49:59 +00:00
Michael Brown 3369f93036 Add block identification to debug messages 2006-07-19 17:58:27 +00:00
Michael Brown e40ebb67de Allow for calling find_dhcp_option() with "options" set to NULL, in order
to search through all registered option blocks.

Move some static inlines that are likely to be used frequently into
dhcpopts.c as normal functions, to save space.
2006-07-19 11:05:38 +00:00
Michael Brown b24947f0c0 Add sketch code to reassemble a DHCP packet from our internal "everything
is a DHCP option" data structures.

We need this code in order to be able to return a DHCP packet to a PXE NBP
which reflects options from our multiple sources (e.g. NVS and DHCP
server).  This is expensive, but necessary.  Having paid this cost, we may
as well try to use the same code to generate our DHCP request packets,
since the process is similar.
2006-07-17 12:47:22 +00:00
Michael Brown 19e8b41562 Add code to modify DHCP option values within a block. 2006-07-13 20:49:04 +00:00
Michael Brown 51d62d1a3c Provide a mechanism for returning the encapsulator as well as the
encapsulated option; this will be needed for modifications to the options
block.
2006-06-28 18:59:54 +00:00
Michael Brown 291f072b82 Add priority mechanism 2006-06-28 13:48:02 +00:00
Michael Brown bd0c8b21ad Change dhcp_num_option() to return the numerical value directly. 2006-06-28 12:16:41 +00:00
Michael Brown 0bcaa8a21f First stab at DHCP option handling in a way that will allow us to have
multiple option sources (e.g. multiple DHCP replies, non-volatile
storage etc.)
2006-06-27 17:24:07 +00:00