From: Shawn Routhier Date: Mon, 20 Jun 2016 14:39:32 +0000 (-0700) Subject: [master] Fix some cut and paste type errors in LDAP code X-Git-Tag: v4_3_5b1~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eb2d84b68ef896553740403fb7caf07897e74b74;p=thirdparty%2Fdhcp.git [master] Fix some cut and paste type errors in LDAP code Squashed commit of the following: [rt42666] Fix some cut and paste type errors in LDAP code Add the character '6' to some strings. They were cut and pasted from the v4 versions and didn't get fully updated. --- diff --git a/RELNOTES b/RELNOTES index 188b46d90..c7eb246a9 100644 --- a/RELNOTES +++ b/RELNOTES @@ -77,6 +77,11 @@ by Eric Young (eay@cryptsoft.com). the client hostname from the original client. [ISC-Bugs #42008] +- In the LDAP code and schema add some missing '6' characters to use + the v6 instead of the v4 versions. Thanks to Denis Taranushin for + reporting this issue and supplying its patch. + [ISC-Bugs #42666] + Changes since 4.3.4b1 - None diff --git a/contrib/ldap/dhcp.schema b/contrib/ldap/dhcp.schema index 0c24a7a2b..378243ecb 100644 --- a/contrib/ldap/dhcp.schema +++ b/contrib/ldap/dhcp.schema @@ -484,5 +484,5 @@ objectclass ( 2.16.840.1.113719.1.203.6.18 SUP top MUST ( cn $ dhcpRange6 ) MAY ( dhcpClassesDN $ dhcpPermitList $ dhcpLeasesDN $ dhcpOptionsDN $ dhcpZoneDN $dhcpKeyDN $ dhcpStatements $ dhcpComments $ dhcpOption ) - X-NDS_CONTAINMENT ('dhcpSubnet' 'dhcpSharedNetwork') ) + X-NDS_CONTAINMENT ('dhcpSubnet6' 'dhcpSharedNetwork') ) diff --git a/server/ldap.c b/server/ldap.c index a5f79eb31..6a31b8d3f 100644 --- a/server/ldap.c +++ b/server/ldap.c @@ -3,7 +3,7 @@ Routines for reading the configuration from LDAP */ /* - * Copyright (c) 2010,2015 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 2010,2015-2016 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 2003-2006 Ntelos, Inc. * All rights reserved. * @@ -638,7 +638,7 @@ ldap_parse_subnet6 (struct ldap_config_stack *item, struct parse *cfile) ldap_value_free_len (tempbv); - if ((tempbv = ldap_get_values_len (ld, item->ldent, "dhcpRange")) != NULL) + if ((tempbv = ldap_get_values_len (ld, item->ldent, "dhcpRange6")) != NULL) { for (i=0; tempbv[i] != NULL; i++) { @@ -702,9 +702,9 @@ ldap_parse_pool6 (struct ldap_config_stack *item, struct parse *cfile) struct berval **tempbv; int i; - x_parser_strcat (cfile, "pool {\n"); + x_parser_strcat (cfile, "pool6 {\n"); - if ((tempbv = ldap_get_values_len (ld, item->ldent, "dhcpRange")) != NULL) + if ((tempbv = ldap_get_values_len (ld, item->ldent, "dhcpRange6")) != NULL) { x_parser_strcat (cfile, "range6"); for (i=0; tempbv[i] != NULL; i++)