Navigation


Changeset 1249:4ad4d614acfa in freeDiameter for libfdcore


Ignore:
Timestamp:
Dec 16, 2013, 11:55:36 PM (10 years ago)
Author:
Sebastien Decugis <sdecugis@freediameter.net>
Branch:
default
Phase:
public
Message:

Attempt to produce a CEA that is compliant with the ABNF when the Error bit is not set. Thanks Antonio Martinez for the report -- http://lists.freediameter.net/pipermail/dev/2013-December/000263.html

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libfdcore/p_ce.c

    r1238 r1249  
    632632static void receiver_reject(struct cnxctx ** recv_cnx, struct msg ** cer, struct fd_pei * error)
    633633{
     634        struct msg_hdr * hdr = NULL;
     635       
    634636        /* Create and send the CEA with appropriate error code */
    635637        CHECK_FCT_DO( fd_msg_new_answer_from_req ( fd_g_config->cnf_dict, cer, MSGFL_ANSW_ERROR ), goto destroy );
    636         CHECK_FCT_DO( fd_msg_rescode_set(*cer, error->pei_errcode, error->pei_message, error->pei_avp, 1 ), goto destroy );
     638        CHECK_FCT_DO( fd_msg_rescode_set(*cer, error->pei_errcode, error->pei_message, error->pei_avp, 0 ), goto destroy );
     639        CHECK_FCT_DO(  fd_msg_hdr( *cer, &hdr ), goto destroy  );
     640        if (hdr->msg_flags & CMD_FLAG_ERROR) {
     641                /* Generic error format, just add the origin AVPs */
     642                CHECK_FCT_DO( fd_msg_add_origin ( *cer, 1 ), goto destroy );
     643        } else {
     644                /* Add other AVPs to be compliant with the ABNF */
     645                CHECK_FCT_DO( add_CE_info(*cer, *recv_cnx, 0, 0), goto destroy );
     646        }
    637647        CHECK_FCT_DO( fd_out_send(cer, *recv_cnx, NULL, 0), goto destroy );
    638648       
Note: See TracChangeset for help on using the changeset viewer.