Navigation


Changeset 1062:56bf0377e2ff in freeDiameter


Ignore:
Timestamp:
Apr 29, 2013, 7:43:52 PM (11 years ago)
Author:
Thomas Klausner <tk@giga.or.at>
Branch:
default
Children:
1064:4e6c7710f4d5, 1065:c4e4e07f1336
Phase:
public
Message:

Raise "Conflicting rules" to error level since it causes validation
errors and usually will stop a message from being accepted or sent.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libfdproto/messages.c

    r1036 r1062  
    23522352        }
    23532353        if (count < min) {
    2354                 TRACE_DEBUG(INFO, "Conflicting rule: the number of occurences (%d) is < the rule min (%d) for '%s'.", count, min, avp_name);
     2354                fd_log_error("Conflicting rule: the number of occurences (%d) is < the rule min (%d) for '%s'.", count, min, avp_name);
    23552355                if (pr_data->pei) {
    23562356                        pr_data->pei->pei_errcode = "DIAMETER_MISSING_AVP";
     
    23622362        /* Check the "max" value */
    23632363        if ((rule->rule_max != -1) && (count > rule->rule_max)) {
    2364                 TRACE_DEBUG(INFO, "Conflicting rule: the number of occurences (%d) is > the rule max (%d) for '%s'.", count, rule->rule_max, avp_name);
     2364                fd_log_error("Conflicting rule: the number of occurences (%d) is > the rule max (%d) for '%s'.", count, rule->rule_max, avp_name);
    23652365                if (pr_data->pei) {
    23662366                        if (rule->rule_max == 0)
     
    23832383                        /* Since "0*1<fixed>" is a valid rule specifier, we only reject cases where the AVP appears *after* its fixed position */
    23842384                        if (first > rule->rule_order) {
    2385                                 TRACE_DEBUG(INFO, "Conflicting rule: the FIXED_HEAD AVP appears first in (%d) position, the rule requires (%d) for '%s'.", first, rule->rule_order, avp_name);
     2385                                fd_log_error("Conflicting rule: the FIXED_HEAD AVP appears first in (%d) position, the rule requires (%d) for '%s'.", first, rule->rule_order, avp_name);
    23862386                                if (pr_data->pei) {
    23872387                                        pr_data->pei->pei_errcode = "DIAMETER_MISSING_AVP";
     
    23962396                        /* Since "0*1<fixed>" is a valid rule specifier, we only reject cases where the AVP appears *before* its fixed position */
    23972397                        if (last > rule->rule_order) {  /* We have a ">" here because we count in reverse order (i.e. from the end) */
    2398                                 TRACE_DEBUG(INFO, "Conflicting rule: the FIXED_TAIL AVP appears last in (%d) position, the rule requires (%d) for '%s'.", last, rule->rule_order, avp_name);
     2398                                fd_log_error("Conflicting rule: the FIXED_TAIL AVP appears last in (%d) position, the rule requires (%d) for '%s'.", last, rule->rule_order, avp_name);
    23992399                                if (pr_data->pei) {
    24002400                                        pr_data->pei->pei_errcode = "DIAMETER_MISSING_AVP";
Note: See TracChangeset for help on using the changeset viewer.