summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Markwalder <tmark@isc.org>2016-10-04 15:04:09 -0400
committerThomas Markwalder <tmark@isc.org>2016-10-04 15:04:09 -0400
commit85241f1f27d8b368f2603e51fb68961490a0bced (patch)
tree0c40cca0e50384b317c998ac033247960048739f
parent3709b7fc844ab8384ba40a1be3cf7916168423e1 (diff)
downloadisc-dhcp-85241f1f27d8b368f2603e51fb68961490a0bced.tar.gz
[v4_1_esv] Server now permits one UID to hold leases in multiple subnets
Merges in rt41358.
-rw-r--r--RELNOTES12
-rw-r--r--server/dhcp.c6
2 files changed, 16 insertions, 2 deletions
diff --git a/RELNOTES b/RELNOTES
index 05f604fc..a4f96afb 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -58,8 +58,18 @@ ISC DHCP is open source software maintained by Internet Systems
Consortium. This product includes cryptographic software written
by Eric Young (eay@cryptsoft.com).
- Changes since 4.1-ESV-R14b1
+ Changes since 4.1-ESV-R14
+
+- The server now allows the client identifier (option 61) to own leases
+ in more than one subnet concurrently. Prior to this the server would
+ incorrectly release an existing lease in one subnet prior to assigning
+ a lease in another subnet. Note that the prior behavior can be still
+ be achieved by enabling one-lease-per-client. Thanks to both David Zych at
+ the University of Illinois and Norm Proffitt of Infoblox for reporting
+ the issue; and Norm for suggesting a solution.
+ [ISC-Bugs #41358]
+ Changes since 4.1-ESV-R14b1
- None
Changes since 4.1-ESV-R13
diff --git a/server/dhcp.c b/server/dhcp.c
index 3f50c6a9..88baa0d4 100644
--- a/server/dhcp.c
+++ b/server/dhcp.c
@@ -3466,6 +3466,7 @@ int find_lease (struct lease **lp,
* preference, so the first one is the best one.
*/
while (uid_lease) {
+ isc_boolean_t do_release = !packet->raw->ciaddr.s_addr;
#if defined (DEBUG_FIND_LEASE)
log_info ("trying next lease matching client id: %s",
piaddr (uid_lease -> ip_addr));
@@ -3490,6 +3491,9 @@ int find_lease (struct lease **lp,
log_info ("wrong network segment: %s",
piaddr (uid_lease -> ip_addr));
#endif
+ /* Allow multiple leases using the same UID
+ on different subnetworks. */
+ do_release = ISC_FALSE;
goto n_uid;
}
@@ -3505,7 +3509,7 @@ int find_lease (struct lease **lp,
if (uid_lease -> n_uid)
lease_reference (&next,
uid_lease -> n_uid, MDL);
- if (!packet -> raw -> ciaddr.s_addr)
+ if (do_release)
release_lease (uid_lease, packet);
lease_dereference (&uid_lease, MDL);
if (next) {