- A memory leak in the minires_nsendsigned() function call was repaired.
Effectively, this leaked ~80 bytes per DDNS update.
- Changes since 3.0.5rc1
+- In the case where an "L2" DHCP Relay Agent (one that does not set giaddr)
+ was directly attached to the same broadcast domain as the DHCP server,
+ the RFC3046 relay agent information option was not being returned to the
+ relay in the server's replies. This was fixed; the dhcp server no longer
+ requires the giaddr to reply with relay agent information. Note that
+ this also improves compatibility with L2 devices that "intercept" DHCP
+ packets and expect relay agent information even in unicast (renewal)
+ replies.
+
+ Changes since 3.0.5rc1
- A bug was repaired in fixes to the dhclient, which sought to run the
dhclient-script with the 'EXPIRE' state should it receive a NAK in
DHCP Protocol engine. */
/*
- * Copyright (c) 2004-2006 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2004-2007 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
#ifndef lint
static char copyright[] =
-"$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";
+"$Id: dhcp.c,v 1.214 2007/03/27 03:48:06 dhankins Exp $ Copyright (c) 2004-2007 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
get_server_source_address(&from, options, packet);
/* If there were agent options in the incoming packet, return
- them. */
- if (packet -> raw -> giaddr.s_addr &&
- packet -> options -> universe_count > agent_universe.index &&
- packet -> options -> universes [agent_universe.index]) {
+ * them. We do not check giaddr to detect the presence of a
+ * relay, as this excludes "l2" relay agents which have no
+ * giaddr to set.
+ */
+ if (packet->options->universe_count > agent_universe.index &&
+ packet->options->universes [agent_universe.index]) {
option_chain_head_reference
((struct option_chain_head **)
&(options -> universes [agent_universe.index]),
state -> got_server_identifier = 1;
/* If there were agent options in the incoming packet, return
- them. Do not return the agent options if they were stashed
- on the lease. */
- if (packet -> raw -> giaddr.s_addr &&
- packet -> options -> universe_count > agent_universe.index &&
- packet -> options -> universes [agent_universe.index] &&
+ * them. Do not return the agent options if they were stashed
+ * on the lease. We do not check giaddr to detect the presence of
+ * a relay, as this excludes "l2" relay agents which have no giaddr
+ * to set.
+ */
+ if (packet->options->universe_count > agent_universe.index &&
+ packet->options->universes [agent_universe.index] &&
(state -> options -> universe_count <= agent_universe.index ||
!state -> options -> universes [agent_universe.index]) &&
lease -> agent_options !=
lease -> agent_options, MDL);
/* If we got relay agent information options, and the packet really
- looks like it came through a relay agent, and if this feature is
- not disabled, save the relay agent information options that came
- in with the packet, so that we can use them at renewal time when
- the packet won't have gone through a relay agent. */
- if (packet -> raw -> giaddr.s_addr &&
- packet -> options -> universe_count > agent_universe.index &&
- packet -> options -> universes [agent_universe.index] &&
+ * looks like it came through a relay agent, and if this feature is
+ * not disabled, save the relay agent information options that came
+ * in with the packet, so that we can use them at renewal time when
+ * the packet won't have gone through a relay agent. We do not
+ * check giaddr to detect the presence of a relay, as this excludes
+ * "l2" relay agents which have no giaddr to set.
+ */
+ if (packet->options->universe_count > agent_universe.index &&
+ packet->options->universes [agent_universe.index] &&
(state -> options -> universe_count <= agent_universe.index ||
state -> options -> universes [agent_universe.index] ==
packet -> options -> universes [agent_universe.index])) {