]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5014] Kea-dhcp6 now actually uses new parser (all unit-tests pass)
authorTomek Mrugalski <tomasz@isc.org>
Sun, 13 Nov 2016 16:58:05 +0000 (01:58 +0900)
committerTomek Mrugalski <tomasz@isc.org>
Sun, 13 Nov 2016 16:58:05 +0000 (01:58 +0900)
src/bin/dhcp6/kea_controller.cc

index f77ee5af4cab476f5c6368b9dd90b33d3fca6d1c..b337b1a4ca0147e91f3d68565a3a6db6c8e00355 100644 (file)
@@ -11,6 +11,7 @@
 #include <dhcpsrv/parsers/dhcp_config_parser.h>
 #include <dhcp6/json_config_parser.h>
 #include <dhcp6/ctrl_dhcp6_srv.h>
+#include <dhcp6/parser_context.h>
 #include <dhcp6/dhcp6_log.h>
 #include <exceptions/exceptions.h>
 
@@ -56,7 +57,12 @@ void configure(const std::string& file_name) {
         }
 
         // Read contents of the file and parse it as JSON
+#if 0
         json = isc::data::Element::fromJSONFile(file_name, true);
+#else
+        Parser6Context parser;
+        json = parser.parseFile(file_name, Parser6Context::PARSER_DHCP6);
+#endif
         if (!json) {
             isc_throw(isc::BadValue, "no configuration found");
         }