]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[github24] Use DHCP{4,6}_OPTION_SPACE instead of a raw string.
authorMarcin Siodelski <marcin@isc.org>
Tue, 27 Sep 2016 11:27:59 +0000 (13:27 +0200)
committerMarcin Siodelski <marcin@isc.org>
Tue, 27 Sep 2016 11:27:59 +0000 (13:27 +0200)
src/lib/dhcpsrv/parsers/dhcp_parsers.cc

index 8c6ab3684f39f915b9b8fa1bf9ae2b821b07643b..748163823eee4752e3a329da67f29535a0327994 100644 (file)
@@ -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", "");