diff options
author | David Hankins <dhankins@isc.org> | 2007-05-23 19:26:22 +0000 |
---|---|---|
committer | David Hankins <dhankins@isc.org> | 2007-05-23 19:26:22 +0000 |
commit | 0becffa4d6895cf3cdbaf7a13564ca4dcf98165d (patch) | |
tree | ba9672704db5ebc14278747b55aade54b57e2a9d | |
parent | 347539efe494204f7f244416ab56639780a9d3dd (diff) | |
download | isc-dhcp-0becffa4d6895cf3cdbaf7a13564ca4dcf98165d.tar.gz |
- Corrected a flaw that broke encapsulated spaces included due to presence
on the parameter request list. [ISC-Bugs #16625]
-rw-r--r-- | RELNOTES | 3 | ||||
-rw-r--r-- | common/options.c | 18 |
2 files changed, 14 insertions, 7 deletions
@@ -69,6 +69,9 @@ the README file. - A flaw in failover startup sequences was repaired that sometimes left the primary DHCP server's pool rebalance schedules unscheduled. +- Corrected a flaw that broke encapsulated spaces included due to presence + on the parameter request list. + Changes since 3.1.0a3 - The execute() statement has been changed from a "numeric expression" to diff --git a/common/options.c b/common/options.c index 27a5dbd6..92458e66 100644 --- a/common/options.c +++ b/common/options.c @@ -34,7 +34,7 @@ #ifndef lint static char copyright[] = -"$Id: options.c,v 1.98.2.10 2007/05/16 21:30:32 dhankins Exp $ Copyright (c) 2004-2007 Internet Systems Consortium. All rights reserved.\n"; +"$Id: options.c,v 1.98.2.11 2007/05/23 19:26:22 dhankins Exp $ Copyright (c) 2004-2007 Internet Systems Consortium. All rights reserved.\n"; #endif /* not lint */ #define DHCP_OPTION_DATA @@ -870,13 +870,17 @@ int store_options (ocount, buffer, buflen, packet, lease, client_state, else option_code_hash_lookup(&option, u->code_hash, &code, 0, MDL); - /* It's an encapsulation, try to find the universe - to be encapsulated first, except that if it's a straight - encapsulation and the user has provided a value for the - encapsulation option, use the user-provided value. */ + /* If it's a straight encapsulation, and the user supplied a + * value for the entire option, use that. Otherwise, search + * the encapsulated space. + * + * If it's a limited encapsulation with preceding data, and the + * user supplied values for the preceding bytes, search the + * encapsulated space. + */ if ((option != NULL) && - ((option->format[0] == 'E' && oc != NULL) || - (option->format[0] == 'e'))) { + (((oc == NULL) && (option->format[0] == 'E')) || + ((oc != NULL) && (option->format[0] == 'e')))) { int uix; static char *s, *t; struct option_cache *tmp; |