Changes since 4.3.2
-- Delayed-ack now works properly with Failover. Prior to this, bind updates
- post startup were being queued but never delivered. Among other things, this
- was causing leases to not transition from expired or released to free.
- [ISC-Bugs #31474]
-
- The server now does a better check to see if it can allocate the memory
for large blocks of v4 leases and should provide a slightly better error
message. Note well: the server pre-allocates v4 addresses, if you use
Thanks to Fernando Soto from BlueCat Networks for the patch.
[ISC-Bugs #39078]
+- Delayed-ack now works properly with Failover. Prior to this, bind updates
+ post startup were being queued but never delivered. Among other things, this
+ was causing leases to not transition from expired or released to free.
+ [ISC-Bugs #31474]
+
- Clean up parsing of v6 lease files a bit to avoid infinite loops if the
lease file is corrupt in certain ways.
[ISC-Bugs #39760]
+- Corrected a crash in dhclient that occurs during lease renewal if the
+ client is performing its own DNS updates.
+ [ISC-Bugs #38639]
+
Changes since 4.3.2rc2
- None
static int check_option_values(struct universe *universe, unsigned int opt,
const char *ptr, size_t len);
+static void dhclient_ddns_cb_free(dhcp_ddns_cb_t *ddns_cb,
+ char* file, int line);
+
#ifndef UNIT_TEST
int
main(int argc, char **argv) {
/* Run the client script with the new parameters. */
script_init(client, (client->state == S_REQUESTING ? "BOUND" :
- (client->state == S_RENEWING ? "RENEW" :
+ (client->state == S_RENEWING ? "RENEW" :
(client->state == S_REBOOTING ? "REBOOT" :
"REBIND"))),
client->new->medium);
lease->next_srv_addr.len = sizeof(packet->raw->siaddr);
memcpy(lease->next_srv_addr.iabuf, &packet->raw->siaddr,
lease->next_srv_addr.len);
-
+
memset(&data, 0, sizeof(data));
if (client -> config -> vendor_space_name) {
/* Client-identifier type : 1 byte */
*client_identifier.buffer->data = 255;
-
+
/* IAID : 4 bytes
* we use the low 4 bytes from the interface address
*/
memcpy(&client_identifier.buffer->data + 5 - hw_len,
client->interface->hw_address.hbuf + hw_idx,
hw_len);
-
+
/* Add the default duid */
memcpy(&client_identifier.buffer->data+(1+4),
default_duid.data, default_duid.len);
}
/* If we are done or have an error clean up */
- ddns_cb_free(ddns_cb, MDL);
+ dhclient_ddns_cb_free(ddns_cb, MDL);
return;
}
ddns_cancel(client->ddns_cb, MDL);
client->ddns_cb = NULL;
}
-
+
ddns_cb = ddns_cb_alloc(MDL);
if (ddns_cb != NULL) {
ddns_cb->address = *addr;
result = client_dns_update(client, ddns_cb);
if (result != ISC_R_TIMEDOUT) {
- ddns_cb_free(ddns_cb, MDL);
+ dhclient_ddns_cb_free(ddns_cb, MDL);
}
}
}
* the control block and should free it.
*/
if (status != ISC_R_TIMEDOUT) {
- if (client != NULL) {
- client->ddns_cb = NULL;
- }
- ddns_cb_free(ddns_cb, MDL);
+ dhclient_ddns_cb_free(ddns_cb, MDL);
}
}
return;
}
- ddns_cb_free(ddns_cb, MDL);
+ dhclient_ddns_cb_free(ddns_cb, MDL);
return;
}
}
if (client->active_lease != NULL) {
/* V6 request, get the client identifier, then
- * construct the dhcid for either standard
+ * construct the dhcid for either standard
* or interim */
if (((oc = lookup_option(&dhcpv6_universe,
client->sent_options,
ddns_cb->flags = DDNS_UPDATE_ADDR | DDNS_INCLUDE_RRSET;
client->ddns_cb = ddns_cb;
-
tv.tv_sec = cur_tv.tv_sec + offset;
tv.tv_usec = cur_tv.tv_usec;
add_timeout(&tv, client_dns_update_timeout,
static void
add_reject(struct packet *packet) {
struct iaddrmatchlist *list;
-
+
list = dmalloc(sizeof(struct iaddrmatchlist), MDL);
if (!list)
log_fatal ("no memory for reject list!");
log_info("Server added to list of rejected servers.");
}
+/* Wrapper function around common ddns_cb_free function that ensures
+ * we set the client_state pointer to the control block to NULL. */
+static void
+dhclient_ddns_cb_free(dhcp_ddns_cb_t *ddns_cb, char* file, int line) {
+ if (ddns_cb) {
+ struct client_state *client = (struct client_state *)ddns_cb->lease;
+ if (client != NULL) {
+ client->ddns_cb = NULL;
+ }
+
+ ddns_cb_free(ddns_cb, file, line);
+ }
+}