]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
- Corrected a flaw that broke encapsulated spaces included due to presence
authorDavid Hankins <dhankins@isc.org>
Wed, 23 May 2007 19:25:40 +0000 (19:25 +0000)
committerDavid Hankins <dhankins@isc.org>
Wed, 23 May 2007 19:25:40 +0000 (19:25 +0000)
  on the parameter request list. [ISC-Bugs #16625]

RELNOTES
common/options.c

index dd7fac7e963eba7203976a5e6e5ddecdba7038b4..eda78b8e33b5383f1e3b80b6b8b73c86adb94f9a 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -173,6 +173,9 @@ suggested fixes to <dhcp-users@isc.org>.
 - 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
 
 - Some spelling fixes.
index 9d14655165f5c896a3aef4981d1a884c211266d1..c75c8b196d378507ad94247c713a7af696637c6d 100644 (file)
@@ -34,7 +34,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: options.c,v 1.109 2007/05/19 18:47:14 dhankins Exp $ Copyright (c) 2004-2007 Internet Systems Consortium.  All rights reserved.\n";
+"$Id: options.c,v 1.110 2007/05/23 19:25:40 dhankins Exp $ Copyright (c) 2004-2007 Internet Systems Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #define DHCP_OPTION_DATA
@@ -1164,13 +1164,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;