with_raddbdir
with_dictdir
with_ascend_binary
-with_dhcp
-with_tacacs
with_udpfromto
with_cap
with_cap_lib_dir
--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
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
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 #############################################################
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
/* 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
#endif
);
- dependency_feature_add(cs, "dhcp",
-#ifdef WITH_DHCP
- true
-#else
- false
-#endif
- );
-
dependency_feature_add(cs, "dynamic-clients",
#ifdef WITH_DYNAMIC_CLIENTS
true
#define ERROR(fmt, ...) fr_perror("dhcpclient: " fmt, ## __VA_ARGS__)
-#ifdef WITH_DHCP
-
#include <ctype.h>
#ifdef HAVE_GETOPT_H
return ret < 0 ? 1 : 0;
}
-
-#endif /* WITH_DHCP */
#include <freeradius-devel/redis/cluster.h>
#include "redis_ippool.h"
-#ifdef WITH_DHCP
#include <freeradius-devel/dhcpv4/dhcpv4.h>
-#endif
/** rlm_redis module instance
*
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 }
};
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:
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);
}
return RLM_MODULE_OK;
}
-#endif
+
return RLM_MODULE_NOOP;
}