From: Alan T. DeKok Date: Sun, 2 Aug 2020 02:07:52 +0000 (-0400) Subject: remove WITH_DHCP X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c27c3072e15cb287c33eededc38413f11fae4e1;p=thirdparty%2Ffreeradius-server.git remove WITH_DHCP --- diff --git a/configure b/configure index 4642eef7c58..1ead3ba979d 100755 --- a/configure +++ b/configure @@ -761,8 +761,6 @@ with_radacctdir with_raddbdir with_dictdir with_ascend_binary -with_dhcp -with_tacacs with_udpfromto with_cap with_cap_lib_dir @@ -1461,8 +1459,6 @@ Optional Packages: --with-raddbdir=DIR directory for config files SYSCONFDIR/raddb --with-dictdir=DIR directory for dictionary files DATAROOTDIR/freeradius --with-ascend-binary include support for Ascend binary filter attributes (default=yes) - --with-dhcp compile in support for dhcp (default=yes) - --with-tacacs compile in support for tacacs (default=yes) --with-udpfromto compile in support for udpfromto (default=yes) --with-cap build with cap if available (default=yes) --with-cap-lib-dir=DIR directory in which to look for cap library files @@ -6073,62 +6069,6 @@ $as_echo "#define WITH_ASCEND_BINARY 1" >>confdefs.h fi - WITH_DHCP=yes - - -# Check whether --with-dhcp was given. -if test "${with_dhcp+set}" = set; then : - withval=$with_dhcp; case "$withval" in - yes|no|'') - ;; - no|'') - ;; - *) - as_fn_error $? "--with[out]-dhcp expects yes|no" "$LINENO" 5 - ;; - esac -fi - - - if test x"$withval" == x"yes"; then - -$as_echo "#define WITH_DHCP 1" >>confdefs.h - - else - -$as_echo "#define WITH_DHCP /**/" >>confdefs.h - - fi - - - WITH_TACACS=yes - - -# Check whether --with-tacacs was given. -if test "${with_tacacs+set}" = set; then : - withval=$with_tacacs; case "$withval" in - yes|no|'') - ;; - no|'') - ;; - *) - as_fn_error $? "--with[out]-tacacs expects yes|no" "$LINENO" 5 - ;; - esac -fi - - - if test x"$withval" == x"yes"; then - -$as_echo "#define WITH_TACACS 1" >>confdefs.h - - else - -$as_echo "#define WITH_TACACS /**/" >>confdefs.h - - fi - - WITH_UDPFROMTO=yes diff --git a/configure.ac b/configure.ac index 59da80d5db3..bca3730993d 100644 --- a/configure.ac +++ b/configure.ac @@ -644,8 +644,6 @@ if test "x$WITH_ASCEND_BINARY" = "xyes"; then AC_DEFINE(WITH_ASCEND_BINARY, [1], [include support for Ascend binary filter attributes]) fi -AX_WITH_FEATURE_ARGS([dhcp],[yes]) -AX_WITH_FEATURE_ARGS([tacacs],[yes]) AX_WITH_FEATURE_ARGS([udpfromto],[yes]) dnl ############################################################# diff --git a/doc/doxygen/Doxyfile b/doc/doxygen/Doxyfile index 9750a911e64..c77a9cb895c 100644 --- a/doc/doxygen/Doxyfile +++ b/doc/doxygen/Doxyfile @@ -2113,7 +2113,6 @@ PREDEFINED = WITH_PROXY \ WITH_DYNAMIC_CLIENTS \ WITH_STATS \ WITH_COA \ - WITH_DHCP \ HAVE_JSON # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this diff --git a/src/include/autoconf.h.in b/src/include/autoconf.h.in index 79819c0d178..387d993b0d4 100644 --- a/src/include/autoconf.h.in +++ b/src/include/autoconf.h.in @@ -639,15 +639,9 @@ /* include support for Ascend binary filter attributes */ #undef WITH_ASCEND_BINARY -/* define if you want dhcp */ -#undef WITH_DHCP - /* define if the server was built with -DNDEBUG */ #undef WITH_NDEBUG -/* define if you want tacacs */ -#undef WITH_TACACS - /* define if you want udpfromto */ #undef WITH_UDPFROMTO diff --git a/src/lib/server/dependency.c b/src/lib/server/dependency.c index b890e4d78b7..596ee39a14b 100644 --- a/src/lib/server/dependency.c +++ b/src/lib/server/dependency.c @@ -379,14 +379,6 @@ void dependency_features_init(CONF_SECTION *cs) #endif ); - dependency_feature_add(cs, "dhcp", -#ifdef WITH_DHCP - true -#else - false -#endif - ); - dependency_feature_add(cs, "dynamic-clients", #ifdef WITH_DYNAMIC_CLIENTS true diff --git a/src/modules/proto_dhcpv4/dhcpclient.c b/src/modules/proto_dhcpv4/dhcpclient.c index 38f7de3a8a1..f12f603a145 100644 --- a/src/modules/proto_dhcpv4/dhcpclient.c +++ b/src/modules/proto_dhcpv4/dhcpclient.c @@ -37,8 +37,6 @@ RCSID("$Id$") #define ERROR(fmt, ...) fr_perror("dhcpclient: " fmt, ## __VA_ARGS__) -#ifdef WITH_DHCP - #include #ifdef HAVE_GETOPT_H @@ -813,5 +811,3 @@ int main(int argc, char **argv) return ret < 0 ? 1 : 0; } - -#endif /* WITH_DHCP */ diff --git a/src/modules/rlm_redis_ippool/rlm_redis_ippool.c b/src/modules/rlm_redis_ippool/rlm_redis_ippool.c index 1cb163a1eb7..0a376e786aa 100644 --- a/src/modules/rlm_redis_ippool/rlm_redis_ippool.c +++ b/src/modules/rlm_redis_ippool/rlm_redis_ippool.c @@ -52,9 +52,7 @@ RCSID("$Id$") #include #include "redis_ippool.h" -#ifdef WITH_DHCP #include -#endif /** rlm_redis module instance * @@ -141,33 +139,25 @@ static CONF_PARSER module_config[] = { static fr_dict_t const *dict_freeradius; static fr_dict_t const *dict_radius; -#ifdef WITH_DHCP static fr_dict_t const *dict_dhcpv4; -#endif extern fr_dict_autoload_t rlm_redis_ippool_dict[]; fr_dict_autoload_t rlm_redis_ippool_dict[] = { { .out = &dict_freeradius, .proto = "freeradius" }, { .out = &dict_radius, .proto = "radius" }, -#ifdef WITH_DHCP { .out = &dict_dhcpv4, .proto = "dhcpv4" }, -#endif { NULL } }; static fr_dict_attr_t const *attr_pool_action; static fr_dict_attr_t const *attr_acct_status_type; -#ifdef WITH_DHCP static fr_dict_attr_t const *attr_message_type; -#endif extern fr_dict_attr_autoload_t rlm_redis_ippool_dict_attr[]; fr_dict_attr_autoload_t rlm_redis_ippool_dict_attr[] = { { .out = &attr_pool_action, .name = "Pool-Action", .type = FR_TYPE_UINT32, .dict = &dict_freeradius }, { .out = &attr_acct_status_type, .name = "Acct-Status-Type", .type = FR_TYPE_UINT32, .dict = &dict_radius }, -#ifdef WITH_DHCP { .out = &attr_message_type, .name = "DHCP-Message-Type", .type = FR_TYPE_UINT8, .dict = &dict_dhcpv4 }, -#endif { NULL } }; @@ -1325,13 +1315,12 @@ static rlm_rcode_t CC_HINT(nonnull) mod_post_auth(module_ctx_t const *mctx, REQU RWDEBUG("Ignoring invalid action %d", vp->vp_uint32); return RLM_MODULE_NOOP; } -#ifdef WITH_DHCP + } else if (request->dict == dict_dhcpv4) { vp = fr_pair_find_by_da(request->control, attr_message_type, TAG_ANY); if (!vp) goto run; if (vp->vp_uint8 == FR_DHCP_REQUEST) action = POOL_ACTION_UPDATE; -#endif } run: diff --git a/src/modules/rlm_soh/rlm_soh.c b/src/modules/rlm_soh/rlm_soh.c index 238339f1cda..87a159301ba 100644 --- a/src/modules/rlm_soh/rlm_soh.c +++ b/src/modules/rlm_soh/rlm_soh.c @@ -144,7 +144,6 @@ static const CONF_PARSER module_config[] = { static rlm_rcode_t CC_HINT(nonnull) mod_post_auth(module_ctx_t const *mctx, REQUEST *request) { -#ifdef WITH_DHCP int rcode; VALUE_PAIR *vp; rlm_soh_t const *inst = talloc_get_type_abort_const(mctx->instance, rlm_soh_t); @@ -202,7 +201,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_post_auth(module_ctx_t const *mctx, REQU } return RLM_MODULE_OK; } -#endif + return RLM_MODULE_NOOP; }