extern fr_dict_attr_autoload_t process_radius_dict_attr[];
fr_dict_attr_autoload_t process_radius_dict_attr[] = {
-
{ .out = &attr_auth_type, .name = "Auth-Type", .type = FR_TYPE_UINT32, .dict = &dict_freeradius },
{ .out = &attr_module_failure_message, .name = "Module-Failure-Message", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
{ .out = &attr_module_success_message, .name = "Module-Success-Message", .type = FR_TYPE_STRING, .dict = &dict_freeradius },
{ NULL }
};
+static fr_value_box_t const *enum_auth_type_accept;
+static fr_value_box_t const *enum_auth_type_reject;
+
+extern fr_dict_enum_autoload_t process_radius_dict_enum[];
+fr_dict_enum_autoload_t process_radius_dict_enum[] = {
+ { .out = &enum_auth_type_accept, .name = "Accept", .attr = &attr_auth_type },
+ { .out = &enum_auth_type_accept, .name = "Reject", .attr = &attr_auth_type },
+ { NULL }
+};
+
/*
* RADIUS state machine configuration
*/
dv = fr_dict_enum_by_value(vp->da, &vp->data);
if (!dv) goto send_reply;
+ /*
+ * The magic Auth-Type accept value
+ * which means skip the authenticate
+ * section...
+ */
+ if (fr_value_box_cmp(enum_auth_type_accept, dv->value) == 0) {
+ request->reply->code = FR_RADIUS_CODE_ACCESS_ACCEPT;
+ goto send_reply;
+ } else if (fr_value_box_cmp(enum_auth_type_reject, dv->value) == 0) {
+ request->reply->code = FR_RADIUS_CODE_ACCESS_REJECT;
+ goto send_reply;
+ }
+
cs = cf_section_find(inst->server_cs, "authenticate", dv->name);
if (!cs) {
RDEBUG2("No 'authenticate %s { ... }' section found - skipping...", dv->name);