2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-03 15:35:17 +00:00

[#1680] fixed compilation

This commit is contained in:
Razvan Becheriu
2021-04-23 16:39:16 +03:00
parent 949e347607
commit f52a71e21f

View File

@@ -117,13 +117,14 @@ TokenIpAddressToText::evaluate(Pkt& /*pkt*/, ValueStack& values) {
} }
values.pop(); values.pop();
if ((size != V4ADDRESS_LEN) && (size != V6ADDRESS_LEN)) { if ((size != isc::asiolink::V4ADDRESS_LEN) &&
(size != isc::asiolink::V6ADDRESS_LEN)) {
isc_throw(EvalTypeError, "Can not convert to valid address."); isc_throw(EvalTypeError, "Can not convert to valid address.");
} }
std::vector<uint8_t> binary(op.begin(), op.end()); std::vector<uint8_t> binary(op.begin(), op.end());
if (size == V4ADDRESS_LEN) { if (size == isc::asiolink::V4ADDRESS_LEN) {
op = asiolink::IOAddress::fromBytes(AF_INET, binary.data()).toText(); op = asiolink::IOAddress::fromBytes(AF_INET, binary.data()).toText();
} else { } else {
op = asiolink::IOAddress::fromBytes(AF_INET6, binary.data()).toText(); op = asiolink::IOAddress::fromBytes(AF_INET6, binary.data()).toText();