From: Marcin Siodelski Date: Tue, 27 Sep 2016 11:27:59 +0000 (+0200) Subject: [github24] Use DHCP{4,6}_OPTION_SPACE instead of a raw string. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5cbce62d1989a653ae6fe1be8971d79b0c797ccd;p=thirdparty%2Fkea.git [github24] Use DHCP{4,6}_OPTION_SPACE instead of a raw string. --- diff --git a/src/lib/dhcpsrv/parsers/dhcp_parsers.cc b/src/lib/dhcpsrv/parsers/dhcp_parsers.cc index 8c6ab3684f..748163823e 100644 --- a/src/lib/dhcpsrv/parsers/dhcp_parsers.cc +++ b/src/lib/dhcpsrv/parsers/dhcp_parsers.cc @@ -525,7 +525,8 @@ OptionDataParser::extractCSVFormat() const { std::string OptionDataParser::extractSpace() const { - std::string space = address_family_ == AF_INET ? "dhcp4" : "dhcp6"; + std::string space = address_family_ == AF_INET ? + DHCP4_OPTION_SPACE : DHCP6_OPTION_SPACE; try { space = string_values_->getParam("space"); @@ -838,7 +839,8 @@ OptionDefParser::createOptionDef(ConstElementPtr option_def_element) { std::string record_types = string_values_->getOptionalParam("record-types", ""); std::string space = string_values_->getOptionalParam("space", - global_context_->universe_ == Option::V4 ? "dhcp4" : "dhcp6"); + global_context_->universe_ == Option::V4 ? DHCP4_OPTION_SPACE : + DHCP6_OPTION_SPACE); std::string encapsulates = string_values_->getOptionalParam("encapsulate", "");