]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
[master] Correct ordering for subnet mask and router and overload vs relay option
authorShawn Routhier <sar@isc.org>
Mon, 28 Apr 2014 23:15:36 +0000 (16:15 -0700)
committerShawn Routhier <sar@isc.org>
Mon, 28 Apr 2014 23:15:36 +0000 (16:15 -0700)
Conflicts:
RELNOTES

RELNOTES
common/options.c

index 6abd5fe899cb92e3ae0c04341690afe64a5be16a..d4f99542dc68d11f41a9e5c7a0a1e8251f622c81 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -84,6 +84,12 @@ by Eric Young (eay@cryptsoft.com).
   heard from this partner) field when updating the state in failover.
   [ISC-Bugs #35549]
 
+- Modify the overload processing to allow space for the remote agent ID
+  [ISC-Bugs #35569]
+  Handle the ordering of the SUBNET_MASK option even if it is the last
+  option in the list.
+  [ISC-Bugs #24580]
+
                        Changes since 4.3.0rc1
 
 - None
index 6b8898c062ed5eba59dc2f8e5f0fdd5bc818f0d4..a15c51fa68ca32b38ce16adfe784e03027f58a12 100644 (file)
@@ -623,7 +623,10 @@ cons_options(struct packet *inpacket, struct dhcp_packet *outpacket,
         * Set offsets for buffer data to be copied into filename
         * and servername fields 
         */
-       mb_max = mb_size;
+       if (mb_size > agent_size)
+               mb_max = mb_size - agent_size;
+       else
+               mb_max = mb_size;
 
        if (overload_avail & 1) {
                of1 = mb_max;
@@ -1167,7 +1170,7 @@ store_options(int *ocount,
        /* Eliminate duplicate options from the parameter request list.
         * Enforce RFC-mandated ordering of options that are present.
         */
-       for (i = 0; i < priority_len - 1; i++) {
+       for (i = 0; i < priority_len; i++) {
                /* Eliminate duplicates. */
                tto = 0;
                for (ix = i + 1; ix < priority_len + tto; ix++) {