Navigation


Changeset 516:1c2f5ee38039 in freeDiameter for extensions/app_radgw/rgw_worker.c


Ignore:
Timestamp:
Aug 27, 2010, 10:59:51 AM (14 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Allow RADIUS Proxies with the app_radgw extension

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/app_radgw/rgw_worker.c

    r405 r516  
    9797               
    9898                /* Check authenticator, if any */
    99                 CHECK_FCT_DO( rgw_msg_auth_check(msg, cli, NULL),
     99                CHECK_FCT_DO( rgw_clients_auth_check(msg, cli, NULL),
    100100                        {
    101101                                /* An error occurred, discard message */
     
    118118                }
    119119               
    120                 /* Check that IP is coherent with the identity in the message */
    121                 CHECK_FCT_DO( rgw_clients_check_origin(msg, cli),
     120                diam_msg = NULL;
     121                /* Note: after this point, the radius message buffer may not be consistent with the array of attributes anymore. */
     122       
     123                /* Check that IP is coherent with the identity in the message, and create an empty message with only Origin information */
     124                CHECK_FCT_DO( rgw_clients_create_origin(msg, cli, &diam_msg),
    122125                        {
    123126                                /* An error occurred, discard message */
    124                                 rgw_msg_free(&msg);
    125                                 rgw_clients_dispose(&cli);
    126                                 continue;
    127                         }  );
    128                
    129                 /* Note: after this point, the radius message buffer may not be consistent with the array of attributes anymore. */
    130                 diam_msg = NULL;
    131                
    132                 /* Create an empty message with only Origin information (no session, no destination -- added by the plugins) */
    133                 CHECK_FCT_DO( rgw_msg_create_base(cli, &diam_msg),
    134                         {
    135                                 /* An error occurred, discard message */
     127                                if (diam_msg) {
     128                                        CHECK_FCT_DO( fd_msg_free(diam_msg), );
     129                                }
    136130                                rgw_msg_free(&msg);
    137131                                rgw_clients_dispose(&cli);
Note: See TracChangeset for help on using the changeset viewer.