Navigation


Changeset 273:bce8e5b7bf78 in freeDiameter for extensions/app_radgw/rgwx_auth.c


Ignore:
Timestamp:
Apr 21, 2010, 2:23:04 PM (14 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Children:
274:c8e57b3ca75f, 275:0941db40bcba
Phase:
public
Message:

Added code to send an STR after a STOP accounting record in RADIUS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/app_radgw/rgwx_auth.c

    r271 r273  
    915915static int auth_diam_ans( struct rgwp_config * cs, struct session * session, struct msg ** diam_ans, struct radius_msg ** rad_fw, struct rgw_client * cli )
    916916{
     917        struct msg_hdr * hdr;
    917918        struct avp *avp, *next, *avp_x, *avp_y, *asid, *aoh;
    918919        struct avp_hdr *ahdr, *sid, *oh;
     
    10491050        /* The RFC text says that this should always be the case, but it seems odd... */
    10501051        if ((*rad_fw)->hdr->code == RADIUS_CODE_ACCESS_ACCEPT) {
     1052                /* Add the Session-Id */
    10511053                if (sizeof(buf) < snprintf(buf, sizeof(buf), "Diameter/%.*s",
    10521054                                sid->avp_value->os.len, sid->avp_value->os.data)) {
     1055                        TRACE_DEBUG(INFO, "Data truncated in Class attribute: %s", buf);
     1056                }
     1057                CONV2RAD_STR(RADIUS_ATTR_CLASS, buf, strlen(buf), 0);
     1058               
     1059                /* Add the auth-application-id required for STR */
     1060                CHECK_FCT( fd_msg_hdr( *diam_ans, &hdr ) );
     1061                if (sizeof(buf) < snprintf(buf, sizeof(buf), CLASS_AAI_PREFIX "%u",
     1062                                hdr->msg_appl)) {
    10531063                        TRACE_DEBUG(INFO, "Data truncated in Class attribute: %s", buf);
    10541064                }
Note: See TracChangeset for help on using the changeset viewer.