Navigation


Changeset 520:9b5422e5385c in freeDiameter


Ignore:
Timestamp:
Aug 27, 2010, 4:20:43 PM (14 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Better handle localhost RADIUS clients

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/app_radgw/rgw_clients.c

    r519 r520  
    454454        if (nas_ip || nas_ip6) {
    455455                if (!valid_nas_info) {
    456                         if (cli->type == RGW_CLI_NAS) {
     456                        if ((!cli->is_local) && (cli->type == RGW_CLI_NAS)) {
    457457                                TRACE_DEBUG(INFO, "Message received with a NAS-IP-Address or NAS-IPv6-Address different \nfrom the sender's. Please configure as Proxy if this is expected.\n Message discarded.");
    458458                                return EINVAL;
    459459                        } else {
    460                                 /* the peer is configured as a proxy, so accept the message */
     460                                /* the peer is configured as a proxy, or running on localhost, so accept the message */
    461461                                sSS ss;
    462462                               
     
    479479                                CHECK_SYS_DO( getnameinfo( (sSA *)&ss, sSAlen(&ss), &buf[0], sizeof(buf), NULL, 0, NI_NAMEREQD),
    480480                                        {
     481                                                if (cli->is_local) {
     482                                                        CHECK_FCT( rgw_clients_get_origin(cli, &oh_str, &or_str) );
     483                                                        goto diameter;
     484                                                }
     485                                               
    481486                                                TRACE_DEBUG(INFO, "The NAS-IP*-Address cannot be DNS reversed in order to create the Origin-Host AVP; rejecting the message (translation is impossible).");
    482487                                                return EINVAL;
Note: See TracChangeset for help on using the changeset viewer.