diff options
author | Michael Brown | 2013-12-04 23:06:10 +0100 |
---|---|---|
committer | Michael Brown | 2013-12-05 01:41:49 +0100 |
commit | 17451b53e2fc696730586edb9d0a858bcc0b2ec8 (patch) | |
tree | e885da23313491fc49f6fcefaef6ac34107c146b /src/net/udp | |
parent | [settings] Explicitly separate the concept of a completed fetched setting (diff) | |
download | ipxe-17451b53e2fc696730586edb9d0a858bcc0b2ec8.tar.gz ipxe-17451b53e2fc696730586edb9d0a858bcc0b2ec8.tar.xz ipxe-17451b53e2fc696730586edb9d0a858bcc0b2ec8.zip |
[settings] Allow for IPv6 setting types in non-IPv6 builds
Allow for the existence of references to IPv6 setting types without
dragging in the whole IPv6 stack, by placing the definition of
setting_type_ipv6 in core/settings.c and providing weak stub methods
for parse_ipv6_setting() and format_ipv6_setting().
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net/udp')
-rw-r--r-- | src/net/udp/dhcpv6.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/net/udp/dhcpv6.c b/src/net/udp/dhcpv6.c index 7bed83d9..668974ca 100644 --- a/src/net/udp/dhcpv6.c +++ b/src/net/udp/dhcpv6.c @@ -255,9 +255,6 @@ static int dhcpv6_iaaddr ( struct dhcpv6_option_list *options, uint32_t iaid, * */ -/** DHCPv6 settings scope */ -static const struct settings_scope dhcpv6_settings_scope; - /** A DHCPv6 settings block */ struct dhcpv6_settings { /** Reference count */ @@ -278,7 +275,7 @@ struct dhcpv6_settings { static int dhcpv6_applies ( struct settings *settings __unused, const struct setting *setting ) { - return ( setting->scope == &dhcpv6_settings_scope ); + return ( setting->scope == &ipv6_scope ); } /** @@ -339,7 +336,7 @@ static int dhcpv6_register ( struct dhcpv6_option_list *options, } ref_init ( &dhcpv6set->refcnt, NULL ); settings_init ( &dhcpv6set->settings, &dhcpv6_settings_operations, - &dhcpv6set->refcnt, &dhcpv6_settings_scope ); + &dhcpv6set->refcnt, &ipv6_scope ); data = ( ( ( void * ) dhcpv6set ) + sizeof ( *dhcpv6set ) ); len = options->len; memcpy ( data, options->data, len ); |