From: Shawn Routhier Date: Mon, 28 Apr 2014 23:15:36 +0000 (-0700) Subject: [master] Correct ordering for subnet mask and router and overload vs relay option X-Git-Tag: v4_3_1b1~27 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1be2ba154dead1489601bf06a922a1d30ff967ca;p=thirdparty%2Fdhcp.git [master] Correct ordering for subnet mask and router and overload vs relay option Conflicts: RELNOTES --- diff --git a/RELNOTES b/RELNOTES index 6abd5fe89..d4f99542d 100644 --- 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 diff --git a/common/options.c b/common/options.c index 6b8898c06..a15c51fa6 100644 --- a/common/options.c +++ b/common/options.c @@ -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++) {