Navigation


Changeset 1191:60e7b02a3ce7 in freeDiameter for libfdcore


Ignore:
Timestamp:
Jun 11, 2013, 10:18:52 AM (11 years ago)
Author:
Sebastien Decugis <sdecugis@freediameter.net>
Branch:
default
Phase:
public
Message:

Allow Vendor-Specific-Application-Id with several Vendor-Id AVPs as seen on some equipments

Location:
libfdcore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libfdcore/dict_base_proto.c

    r928 r1191  
    891891                                       
    892892                        struct local_rules_definition rules[] =
    893                                                 {        {  "Vendor-Id",                        RULE_REQUIRED, -1, 1 }
     893                                                {
     894#ifndef WORKAROUND_ACCEPT_INVALID_VSAI
     895                                                        /* ABNF from RFC6733 */
     896                                                         {  "Vendor-Id",                        RULE_REQUIRED, -1, 1 }
     897#else /* WORKAROUND_ACCEPT_INVALID_VSAI */
     898                                                        /* ABNF from RFC3588 (including erratum, because original text is nonsense) */
     899                                                         {  "Vendor-Id",                        RULE_REQUIRED, -1, -1}
     900#endif /* WORKAROUND_ACCEPT_INVALID_VSAI */
    894901                                                        ,{  "Auth-Application-Id",              RULE_OPTIONAL, -1, 1 }
    895902                                                        ,{  "Acct-Application-Id",              RULE_OPTIONAL, -1, 1 }
  • libfdcore/p_ce.c

    r1186 r1191  
    470470                                                switch (inhdr->avp_code) {
    471471                                                        case AC_VENDOR_ID: /* Vendor-Id */
     472#ifndef WORKAROUND_ACCEPT_INVALID_VSAI
    472473                                                                if (vid != 0)
    473                                                                         invalid++; /* We already had one such AVP */
     474                                                                        invalid++; /* We already had one such AVP. This is invalid according to RFC6733 but not RFC3588 (but there is an erratum) */
     475#endif /* WORKAROUND_ACCEPT_INVALID_VSAI */
    474476                                                                vid = inhdr->avp_value->u32;
    475477                                                                break;
Note: See TracChangeset for help on using the changeset viewer.