summaryrefslogtreecommitdiffstats
path: root/src/bin/dhcp6/tests/dhcp6_client.cc
diff options
context:
space:
mode:
authorTomek Mrugalski <tomasz@isc.org>2015-06-19 19:41:18 +0200
committerTomek Mrugalski <tomasz@isc.org>2015-06-19 19:41:18 +0200
commit7616e3b3b8dfc7bb4d95665651acd0056cd66408 (patch)
tree7813fbbc520af4b6935ae5201745e09c9f93a810 /src/bin/dhcp6/tests/dhcp6_client.cc
parent[master] Forgotten cleanup for 3800: remove tabs. (diff)
parent[3795] Changes after review: (diff)
downloadkea-7616e3b3b8dfc7bb4d95665651acd0056cd66408.tar.xz
kea-7616e3b3b8dfc7bb4d95665651acd0056cd66408.zip
[master] Merge branch 'trac3795' (DHCPv6 statistics)
Conflicts: doc/guide/dhcp4-srv.xml
Diffstat (limited to 'src/bin/dhcp6/tests/dhcp6_client.cc')
-rw-r--r--src/bin/dhcp6/tests/dhcp6_client.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/bin/dhcp6/tests/dhcp6_client.cc b/src/bin/dhcp6/tests/dhcp6_client.cc
index 1fc120a9be..9de4755c8b 100644
--- a/src/bin/dhcp6/tests/dhcp6_client.cc
+++ b/src/bin/dhcp6/tests/dhcp6_client.cc
@@ -295,6 +295,9 @@ Dhcp6Client::doSARR() {
void
Dhcp6Client::doSolicit() {
context_.query_ = createMsg(DHCPV6_SOLICIT);
+ if (forced_server_id_) {
+ context_.query_->addOption(forced_server_id_);
+ }
if (use_na_) {
context_.query_->addOption(Option6IAPtr(new Option6IA(D6O_IA_NA,
1234)));
@@ -327,7 +330,11 @@ Dhcp6Client::doSolicit() {
void
Dhcp6Client::doRequest() {
Pkt6Ptr query = createMsg(DHCPV6_REQUEST);
- query->addOption(context_.response_->getOption(D6O_SERVERID));
+ if (!forced_server_id_) {
+ query->addOption(context_.response_->getOption(D6O_SERVERID));
+ } else {
+ query->addOption(forced_server_id_);
+ }
copyIAs(context_.response_, query);
// Add Client FQDN if configured.