summaryrefslogtreecommitdiffstats
path: root/src/lib/dhcp/option6_addrlst.cc
diff options
context:
space:
mode:
authorJeremy C. Reed <jreed@ISC.org>2011-12-14 15:09:06 +0100
committerJeremy C. Reed <jreed@ISC.org>2011-12-14 15:09:06 +0100
commitd394e64f4c44f16027b1e62b4ac34e054b49221d (patch)
treef89bf215367fe880a60dfb557588a47bbfbae69d /src/lib/dhcp/option6_addrlst.cc
parent[trac1446] rename of libdhcp_unittests to libdhcp++_unittests (diff)
parentMerge branch 'master' of ssh://git.bind10.isc.org/var/bind10/git/bind10 (diff)
downloadkea-d394e64f4c44f16027b1e62b4ac34e054b49221d.tar.xz
kea-d394e64f4c44f16027b1e62b4ac34e054b49221d.zip
[trac1446]Merge branch 'master' into trac1446
I fixed three conflicts. In addition to merge this also updates new bin/dhcp4 to use libdhcp++.la.
Diffstat (limited to 'src/lib/dhcp/option6_addrlst.cc')
-rw-r--r--src/lib/dhcp/option6_addrlst.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/dhcp/option6_addrlst.cc b/src/lib/dhcp/option6_addrlst.cc
index b762019b3b..fb082fa082 100644
--- a/src/lib/dhcp/option6_addrlst.cc
+++ b/src/lib/dhcp/option6_addrlst.cc
@@ -50,6 +50,10 @@ Option6AddrLst::Option6AddrLst(unsigned short type,
void
Option6AddrLst::setAddress(const isc::asiolink::IOAddress& addr) {
+ if (addr.getFamily() != AF_INET6) {
+ isc_throw(BadValue, "Can't store non-IPv6 address in Option6AddrLst option");
+ }
+
addrs_.clear();
addrs_.push_back(addr);
}
@@ -128,7 +132,7 @@ std::string Option6AddrLst::toText(int indent /* =0 */) {
return tmp.str();
}
-unsigned short Option6AddrLst::len() {
+uint16_t Option6AddrLst::len() {
return (OPTION6_HDR_LEN + addrs_.size()*16);
}