summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Hankins <dhankins@isc.org>2006-10-17 20:45:59 +0000
committerDavid Hankins <dhankins@isc.org>2006-10-17 20:45:59 +0000
commit66c8f7347aee4c6a72f1915d199ac64cde8a7adb (patch)
treeeba320be8269819f3f065280a8073a15b610a7f9
parent7cbeb9f493da928aae07dda3b6ed6f2be088e81c (diff)
downloadisc-dhcp-66c8f7347aee4c6a72f1915d199ac64cde8a7adb.tar.gz
- An option definition referencing leak was fixed, which resulted in early
termination of dhclient upon the renewal event. [ISC-Bugs #16423]
-rw-r--r--RELNOTES5
-rw-r--r--common/options.c6
-rw-r--r--common/tree.c4
-rw-r--r--server/dhcp.c5
4 files changed, 12 insertions, 8 deletions
diff --git a/RELNOTES b/RELNOTES
index 918a8c6d..a2e42b6b 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -36,7 +36,10 @@ the README file.
- UPDREQ/UPDREQALL handling was optimized - it no longer dequeues and
requeues all pending updates. This should reduce the number of spurious
- 'xid mismatch' log mesasges.
+ 'xid mismatch' log messages.
+
+- An option definition referencing leak was fixed, which resulted in early
+ termination of dhclient upon the renewal event.
Changes since 3.0 (New Features)
diff --git a/common/options.c b/common/options.c
index 36419366..c3a3fde2 100644
--- a/common/options.c
+++ b/common/options.c
@@ -34,7 +34,7 @@
#ifndef lint
static char copyright[] =
-"$Id: options.c,v 1.99 2006/08/24 14:58:55 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
+"$Id: options.c,v 1.100 2006/10/17 20:45:59 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#define DHCP_OPTION_DATA
@@ -1689,7 +1689,7 @@ void set_option (universe, options, option, op)
break;
}
}
- noc -> option = oc -> option;
+ option_reference(&(noc->option), oc->option, MDL);
save_option (universe, options, noc);
option_cache_dereference (&noc, MDL);
break;
@@ -2992,7 +2992,7 @@ add_option(struct option_state *options,
return 0;
}
- oc->option = option;
+ option_reference(&(oc->option), option, MDL);
save_option(&dhcp_universe, options, oc);
option_cache_dereference(&oc, MDL);
diff --git a/common/tree.c b/common/tree.c
index 9c316f75..d5bf7ded 100644
--- a/common/tree.c
+++ b/common/tree.c
@@ -34,7 +34,7 @@
#ifndef lint
static char copyright[] =
-"$Id: tree.c,v 1.108 2006/07/31 22:19:51 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
+"$Id: tree.c,v 1.109 2006/10/17 20:45:59 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -242,7 +242,7 @@ int make_const_option_cache (oc, buffer, data, len, option, file, line)
(*oc) -> data.terminated = 0;
if (data)
memcpy (&bp -> data [0], data, len);
- (*oc) -> option = option;
+ option_reference(&((*oc)->option), option, MDL);
return 1;
}
diff --git a/server/dhcp.c b/server/dhcp.c
index 4263781d..288dc965 100644
--- a/server/dhcp.c
+++ b/server/dhcp.c
@@ -34,7 +34,7 @@
#ifndef lint
static char copyright[] =
-"$Id: dhcp.c,v 1.212 2006/08/22 17:13:25 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
+"$Id: dhcp.c,v 1.213 2006/10/17 20:45:59 dhankins Exp $ Copyright (c) 2004-2006 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -2426,7 +2426,8 @@ void ack_lease (packet, lease, offer, when, msg, ms_nulltp, hp)
expression_reference (&noc -> expression,
oc -> expression, MDL);
if (oc -> option)
- noc -> option = oc -> option;
+ option_reference(&(noc->option), oc->option,
+ MDL);
}
save_option (&dhcp_universe, state -> options, noc);