Navigation


Changeset 526:6fe3e5cf9fb2 in freeDiameter


Ignore:
Timestamp:
Sep 1, 2010, 4:21:15 PM (14 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Added a flag to disable NAI routing in RADIUS/Diameter gw

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • doc/app_radgw.conf.sample

    r516 r526  
    4141
    4242RGWX = "extensions/echodrop.rgwx" : "echodrop.rgwx.conf"; # See echodrop.rgwx.conf.sample file
    43 RGWX = "extensions/auth.rgwx" : auth;
     43RGWX = "extensions/auth.rgwx" : auth; 
    4444RGWX = "extensions/acct.rgwx" : acct;
    4545# RGWX = "extensions/debug.rgwx"; # Uncomment to see the result of the translation plugins.
     46
     47# For some extensions (auth, acct), a false configuration file name
     48# can be passed to specify flags, such as "nonai" to ignore NAI-based routing.
    4649
    4750##################
  • extensions/app_radgw/rgwx_acct.c

    r448 r526  
    150150        struct session_handler * sess_hdl; /* We store RADIUS request authenticator information in the session */
    151151        char * confstr;
     152       
     153        int ignore_nai;
    152154};
    153155
     
    173175        CHECK_FCT( fd_sess_handler_create( &new->sess_hdl, free ) );
    174176        new->confstr = conffile;
     177       
     178        if (strstr(conffile, "nonai"))
     179                new->ignore_nai = 1;
    175180       
    176181        /* Resolve all dictionary objects we use */
     
    461466        CHECK_FCT( fd_msg_avp_new ( cs->dict.Destination_Realm, 0, &avp ) );
    462467        idx = 0;
    463         if (un) {
     468        if (un && ! cs->ignore_nai) {
    464469                /* Is there an '@' in the user name? We don't care for decorated NAI here */
    465470                for (idx = un_len - 2; idx > 0; idx--) {
  • extensions/app_radgw/rgwx_auth.c

    r405 r526  
    123123        struct session_handler * sess_hdl; /* We store RADIUS request authenticator information in the session */
    124124        char * confstr;
     125       
     126        int ignore_nai;
    125127};
    126128
    127129/* Initialize the plugin */
    128 static int auth_conf_parse(char * conffile, struct rgwp_config ** state)
     130static int auth_conf_parse(char * confstr, struct rgwp_config ** state)
    129131{
    130132        struct rgwp_config * new;
    131133        struct dict_object * app;
    132134       
    133         TRACE_ENTRY("%p %p", conffile, state);
     135        TRACE_ENTRY("%p %p", confstr, state);
    134136        CHECK_PARAMS( state );
    135137       
     
    138140       
    139141        CHECK_FCT( fd_sess_handler_create( &new->sess_hdl, free ) );
    140         new->confstr = conffile;
     142        new->confstr = confstr;
     143       
     144        if (strstr(confstr, "nonai"))
     145                new->ignore_nai = 1;
    141146       
    142147        /* Resolve all dictionary objects we use */
     
    418423        } else {
    419424                int i = 0;
    420                 if (un) {
     425                if (un && ! cs->ignore_nai) {
    421426                        /* Is there an '@' in the user name? We don't care for decorated NAI here */
    422427                        for (i = un_len - 2; i > 0; i--) {
  • extensions/rt_ereg/rtereg.c

    r525 r526  
    6161                struct fd_list * c;
    6262               
     63                TRACE_DEBUG(ANNOYING, "Attempt pattern matching of '%.*s' with rule '%s'", len, value, r->pattern);
     64               
    6365                #ifdef HAVE_REG_STARTEND
    6466                {
Note: See TracChangeset for help on using the changeset viewer.