Rearrange dhcp / vqp dictionary things.
authorAlan T. DeKok <aland@freeradius.org>
Sun, 28 Apr 2013 14:31:43 +0000 (10:31 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 28 Apr 2013 14:31:43 +0000 (10:31 -0400)
The new conf file parser requires that the dictionaries are
loaded BEFORE parsing the config files.  So we can't dynamically
load dictionaries based on the conf-file contents

share/dictionary
src/modules/proto_dhcp/rlm_dhcp.c

index 696ee53..7fcd08e 100644 (file)
@@ -237,7 +237,6 @@ $INCLUDE dictionary.usr
 $INCLUDE dictionary.utstarcom
 $INCLUDE dictionary.valemount
 $INCLUDE dictionary.versanet
-$INCLUDE dictionary.vqp
 $INCLUDE dictionary.waverider
 $INCLUDE dictionary.walabi
 $INCLUDE dictionary.wichorus
@@ -252,6 +251,9 @@ $INCLUDE dictionary.zyxel
 #      DHCP dictionary for DHCP functionality and use of dhcp module
 $INCLUDE dictionary.dhcp
 
+#      VQP dictionary for VMPS functionality and use of vmps module
+$INCLUDE dictionary.vqp
+
 #
 #      And finally the server internal attributes.
 #      These are attributes which NEVER go into a RADIUS packet.
index d3b2934..6a00981 100644 (file)
@@ -107,17 +107,6 @@ static int mod_instantiate(UNUSED CONF_SECTION *conf, void *instance)
        
        xlat_register("dhcp_options", dhcp_options_xlat, NULL, inst);
 
-       /*
-        *      Load the DHCP dictionary if it hasn't already been loaded.
-        */
-       if (!dict_attrbyname("DHCP-Message-Type")) {
-               if (dict_read(mainconfig.dictionary_dir, "dictionary.dhcp") < 0) {
-                       ERROR("Cannot open %s/dictionary.dhcp: %s",
-                              mainconfig.dictionary_dir, fr_strerror());
-                       return -1;
-               }
-       }
-
        return 0;
 }