Mercurial > hg > freeDiameter
changeset 268:b364ffffa2ed
Ported the Echo/Drop plugin from waaad
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Mon, 19 Apr 2010 16:58:02 +0900 |
parents | 51d224448024 |
children | c78f623c702d |
files | extensions/app_radgw/CMakeLists.txt extensions/app_radgw/rgwx_acct.c |
diffstat | 2 files changed, 10 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/extensions/app_radgw/CMakeLists.txt Mon Apr 19 12:15:56 2010 +0900 +++ b/extensions/app_radgw/CMakeLists.txt Mon Apr 19 16:58:02 2010 +0900 @@ -94,24 +94,11 @@ ENDIF (BUILD_RGWX_ACCT) - - - - - - -# -# OPTION(BUILD_SUB_ECHO_DROP "Build 'echo/drop' sub-extension? (echo or drop specific RADIUS attributes, no Diameter translation)" ON) -# IF (BUILD_SUB_ECHO_DROP) -# ADD_DEFINITIONS(-DSUB_ECHO_DROP_VERBO=2) -# BISON_FILE(sub_echo_drop.y) -# FLEX_FILE(sub_echo_drop.l) -# SET_SOURCE_FILES_PROPERTIES(lex.sub_echo_drop.c sub_echo_drop.tab.c PROPERTIES COMPILE_FLAGS "-I ${CMAKE_CURRENT_SOURCE_DIR}") -# ADD_LIBRARY(sub_echo_drop MODULE ${RG_COMMON_HEADER} -# sub_echo_drop.c -# sub_echo_drop.h -# lex.sub_echo_drop.c -# sub_echo_drop.tab.c -# sub_echo_drop.tab.h) -# TARGET_LINK_LIBRARIES(sub_echo_drop rg_common) -# ENDIF (BUILD_SUB_ECHO_DROP) +### Generic plugin to handle some attributes (either delete them or simply echo them in the answer) +OPTION(BUILD_RGWX_ECHODROP "Build 'echo/drop' plugin? (drop specific RADIUS attributes or echo them in RADIUS answer)" ON) + IF (BUILD_RGWX_ECHODROP) + BISON_FILE(rgwx_echodrop.y) + FLEX_FILE(rgwx_echodrop.l) + SET_SOURCE_FILES_PROPERTIES(lex.rgwx_echodrop.c rgwx_echodrop.tab.c PROPERTIES COMPILE_FLAGS "-I ${CMAKE_CURRENT_SOURCE_DIR}") + RGWX_ADD_PLUGIN(echodrop ${RG_COMMON_HEADER} rgwx_echodrop.h rgwx_echodrop.c lex.rgwx_echodrop.c rgwx_echodrop.tab.c rgwx_echodrop.tab.h ) + ENDIF (BUILD_RGWX_ECHODROP)
--- a/extensions/app_radgw/rgwx_acct.c Mon Apr 19 12:15:56 2010 +0900 +++ b/extensions/app_radgw/rgwx_acct.c Mon Apr 19 16:58:02 2010 +0900 @@ -77,6 +77,8 @@ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "State", &new->dict.State, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "User-Name", &new->dict.User_Name, ENOENT) ); + TODO("Advertize application support..."); + *state = new; return 0; }