freeradius 如何调用module 处理auth
例子
static rlm_rcode_t _test_sql_authenticate(UNUSED rlm_eap_t *inst, REQUEST *request) { REQUEST *fake; VALUE_PAIR *vp1, *vp2; int rc = RLM_MODULE_FAIL; int idx; DICT_VALUE *dval; fake = request_alloc_fake(request); rad_assert(!fake->packet->vps); fake->packet->vps = fr_pair_list_copy(fake->packet, request->packet->vps); /* set the virtual server to use */ if ((vp1 = fr_pair_find_by_num(request->config, PW_VIRTUAL_SERVER, 0, TAG_ANY)) != NULL) { fake->server = vp1->vp_strvalue; } else { fake->server = "check-by-controller"; } /* set auth result */ vp2 = fr_pair_find_by_num(fake->packet->vps, PW_FREERADIUS_STATS_ERROR, VENDORPEC_FREERADIUS, TAG_ANY); if (!vp2) { vp2 = fr_pair_afrom_num(fake->packet, PW_FREERADIUS_STATS_ERROR, VENDORPEC_FREERADIUS); } if (rc == RLM_MODULE_OK) { fr_pair_value_strcpy(vp2, "accept"); } else { fr_pair_value_strcpy(vp2, "reject"); } fr_pair_add(&fake->packet->vps, vp2); RDEBUG2("process eap_peap authenticate at virtual server %s", fake->server); dval = dict_valbyname(PW_AUTH_TYPE, 0, "sql"); idx = dval->value; rc = process_authenticate(idx, fake); /* copy the reply vps back to our reply */ fr_pair_list_mcopy_by_num(request->reply, &request->reply->vps, &fake->reply->vps, 0, 0, TAG_ANY); talloc_free(fake); return rc; }
http代理服务器(3-4-7层代理)-网络事件库公共组件、内核kernel驱动 摄像头驱动 tcpip网络协议栈、netfilter、bridge 好像看过!!!!
但行好事 莫问前程
--身高体重180的胖子
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 没有源码,如何修改代码逻辑?
· PowerShell开发游戏 · 打蜜蜂
· 在鹅厂做java开发是什么体验
· 百万级群聊的设计实践
· WPF到Web的无缝过渡:英雄联盟客户端的OpenSilver迁移实战
2022-08-16 DPVS简介 转载
2020-08-16 http 怎样关闭
2020-08-16 http 响应 ngx_http_send_header ngx_http_output_filter
2020-08-16 http 请求体数据处理2--ngx
2020-08-16 http 请求体数据--ngx