diff options
author | Jeremy C. Reed <jreed@ISC.org> | 2011-12-14 15:09:06 +0100 |
---|---|---|
committer | Jeremy C. Reed <jreed@ISC.org> | 2011-12-14 15:09:06 +0100 |
commit | d394e64f4c44f16027b1e62b4ac34e054b49221d (patch) | |
tree | f89bf215367fe880a60dfb557588a47bbfbae69d /src/lib/dhcp/option6_addrlst.cc | |
parent | [trac1446] rename of libdhcp_unittests to libdhcp++_unittests (diff) | |
parent | Merge branch 'master' of ssh://git.bind10.isc.org/var/bind10/git/bind10 (diff) | |
download | kea-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.cc | 6 |
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); } |