summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorEvan Hunt <each@isc.org>2008-07-19 01:09:47 +0000
committerEvan Hunt <each@isc.org>2008-07-19 01:09:47 +0000
commit233c469787d3fc820762486dfbd614c6e9b5003a (patch)
tree49a36208fca19457169e0accbf9aa078a5f4bd98 /common
parentb36256ea5a193bfc99db56f180e18332828d311c (diff)
downloadisc-dhcp-233c469787d3fc820762486dfbd614c6e9b5003a.tar.gz
Clients that sent a parameter request list containing the routers option
before the subnet mask option were receiving only the latter. [rt18133]
Diffstat (limited to 'common')
-rw-r--r--common/options.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/common/options.c b/common/options.c
index e7d1f15e..b3f4e7f0 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.15 2008/04/04 21:36:29 dhankins Exp $ Copyright (c) 2004-2008 Internet Systems Consortium. All rights reserved.\n";
+"$Id: options.c,v 1.98.2.16 2008/07/19 01:09:47 each Exp $ Copyright (c) 2004-2008 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#define DHCP_OPTION_DATA
@@ -880,15 +880,10 @@ store_options(int *ocount,
*/
if (priority_list[i] == DHO_SUBNET_MASK) {
for (ix = i - 1 ; ix >= 0 ; ix--) {
- /* We know that anything before 'i' can only
- * appear once. So shovel the options to make
- * room to bubble the subnet mask ahead, and
- * then break out of the loop, we're done.
- */
if (priority_list[ix] == DHO_ROUTERS) {
- memmove(priority_list + ix + 1,
- priority_list + ix, i - ix);
+ /* swap */
priority_list[ix] = DHO_SUBNET_MASK;
+ priority_list[i] = DHO_ROUTERS;
break;
}
}