summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorThomas Markwalder <tmark@isc.org>2016-01-18 08:46:17 -0500
committerThomas Markwalder <tmark@isc.org>2016-01-18 08:46:17 -0500
commita3471269e693cc4b49666874d5e57a6c9151b3b0 (patch)
tree9e2c3444d510d2404b665cf7e7c54c7c61c5ae9f /client
parent4ced250f58d646a466ebcafdbbdb215bcf724638 (diff)
downloadisc-dhcp-a3471269e693cc4b49666874d5e57a6c9151b3b0.tar.gz
[master] dhclient -6 now supports option expressions such as prepend
Merges in rt39952.
Diffstat (limited to 'client')
-rw-r--r--client/dhc6.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/client/dhc6.c b/client/dhc6.c
index b3a7d5c2..aacd4aea 100644
--- a/client/dhc6.c
+++ b/client/dhc6.c
@@ -1,7 +1,7 @@
/* dhc6.c - DHCPv6 client routines. */
/*
- * Copyright (c) 2012-2015 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2012-2016 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 2006-2010 by Internet Systems Consortium, Inc. ("ISC")
*
* Permission to use, copy, modify, and distribute this software for any
@@ -572,7 +572,7 @@ dhc6_dup_addr(struct dhc6_addr *addr, const char *file, int line)
*
*/
static struct dhc6_lease *
-dhc6_leaseify(struct packet *packet)
+dhc6_leaseify(struct packet *packet, struct client_state* client)
{
struct data_string ds;
struct dhc6_lease *lease;
@@ -681,6 +681,11 @@ dhc6_leaseify(struct packet *packet)
lease->server_id.data, 52));
}
+ execute_statements_in_scope(NULL, (struct packet *)packet, NULL,
+ client, lease->options, lease->options,
+ &global_scope, client->config->on_receipt,
+ NULL, NULL);
+
return lease;
}
@@ -3114,7 +3119,7 @@ init_handler(struct packet *packet, struct client_state *client)
return;
}
- lease = dhc6_leaseify(packet);
+ lease = dhc6_leaseify(packet, client);
/* Out of memory or corrupt packet condition...hopefully a temporary
* problem. Returning now makes us try to retransmit later.
@@ -3204,6 +3209,12 @@ info_request_handler(struct packet *packet, struct client_state *client)
option_state_reference(&client->active_lease->options,
packet->options, MDL);
+ execute_statements_in_scope(NULL, (struct packet *)packet, NULL, client,
+ client->active_lease->options,
+ client->active_lease->options,
+ &global_scope, client->config->on_receipt,
+ NULL, NULL);
+
start_informed(client);
}
@@ -3238,7 +3249,7 @@ rapid_commit_handler(struct packet *packet, struct client_state *client)
return;
}
- lease = dhc6_leaseify(packet);
+ lease = dhc6_leaseify(packet, client);
/* Out of memory or corrupt packet condition...hopefully a temporary
* problem. Returning now makes us try to retransmit later.
@@ -4179,7 +4190,7 @@ reply_handler(struct packet *packet, struct client_state *client)
return;
}
- lease = dhc6_leaseify(packet);
+ lease = dhc6_leaseify(packet, client);
/* Out of memory or corrupt packet condition...hopefully a temporary
* problem. Returning now makes us try to retransmit later.