diff options
author | Shawn Routhier <sar@isc.org> | 2010-04-20 23:47:29 +0000 |
---|---|---|
committer | Shawn Routhier <sar@isc.org> | 2010-04-20 23:47:29 +0000 |
commit | 494ccb71ed630c5ed233ea1f5e2c826535d9a17a (patch) | |
tree | 998a8523b56093fce69cce42c9ab2648c7369c1e | |
parent | 53afd42578bfc6e44d0eaeeef64ffe04dd9098b7 (diff) | |
download | isc-dhcp-494ccb71ed630c5ed233ea1f5e2c826535d9a17a.tar.gz |
Don't include lease time information in the response to a DHCPINFORM
request. We do this by removing any time information from the option
cache before building the reponse packet. Bug ticket 21092.
-rw-r--r-- | RELNOTES | 3 | ||||
-rw-r--r-- | common/options.c | 4 | ||||
-rw-r--r-- | server/dhcp.c | 9 |
3 files changed, 14 insertions, 2 deletions
@@ -56,6 +56,9 @@ suggested fixes to <dhcp-users@isc.org>. - Cleaned up some compiler warnings +- Prohibit including lease time information in a response to a DHCP INFORM + Bug ticket 21092. + Changes since 4.0.2rc1 - None diff --git a/common/options.c b/common/options.c index 524fef2d..5f04e42e 100644 --- a/common/options.c +++ b/common/options.c @@ -3,7 +3,7 @@ DHCP options parsing and reassembly. */ /* - * Copyright (c) 2004-2009 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1995-2003 by Internet Software Consortium * * Permission to use, copy, modify, and distribute this software for any @@ -637,6 +637,8 @@ cons_options(struct packet *inpacket, struct dhcp_packet *outpacket, /* * Preload the option priority list with protocol-mandatory options. * This effectively gives these options the highest priority. + * This provides the order for any available options, the option + * must be in the option cache in order to actually be included. */ priority_len = 0; priority_list[priority_len++] = DHO_DHCP_MESSAGE_TYPE; diff --git a/server/dhcp.c b/server/dhcp.c index d98c1890..d2a29add 100644 --- a/server/dhcp.c +++ b/server/dhcp.c @@ -3,7 +3,7 @@ DHCP Protocol engine. */ /* - * Copyright (c) 2004-2009 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1995-2003 by Internet Software Consortium * * Permission to use, copy, modify, and distribute this software for any @@ -1189,6 +1189,13 @@ void dhcpinform (packet, ms_nulltp) } } + /* + * Remove any time options, per section 3.4 RFC 2131 + */ + delete_option(&dhcp_universe, options, DHO_DHCP_LEASE_TIME); + delete_option(&dhcp_universe, options, DHO_DHCP_RENEWAL_TIME); + delete_option(&dhcp_universe, options, DHO_DHCP_REBINDING_TIME); + /* Set up the option buffer... */ outgoing.packet_length = cons_options (packet, outgoing.raw, (struct lease *)0, |