Commit 6208b8d7 authored by Sebastien Decugis's avatar Sebastien Decugis
Browse files

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

parent aeb7727a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -13,7 +13,8 @@ freediameter (1.2.0) UNRELEASED; urgency=low
  * API changes: all the fd_*_dump functions now return malloc'd strings instead of logging directly.
  * Updated dbg_monitoring extension to use the new API
  * New script to generate dictionary extensions from org file (see contrib/tools)
  * New compilation option: WORKAROUND_ACCEPT_INVALID_VSAI to improve interoperability.
  * New compilation option: WORKAROUND_ACCEPT_INVALID_VSAI to improve compatibility
    with invalid Vendor-Specific-Application-Id AVPs received from some equipments (e.g. Cisco).
  * New compilation option: DISABLE_PEER_EXPIRY for use in test environments.
  * Extensions are now also searched in LD_LIBRARY_PATH.
  * Copy Proxy-Info AVP automatically in new answers.
+8 −1
Original line number Diff line number Diff line
@@ -890,7 +890,14 @@ int fd_dict_base_protocol(struct dictionary * dict)
					};
					
			struct local_rules_definition rules[] = 
						{ 	 {  "Vendor-Id", 			RULE_REQUIRED, -1, 1 }
						{
#ifndef WORKAROUND_ACCEPT_INVALID_VSAI
							/* ABNF from RFC6733 */
						 	 {  "Vendor-Id", 			RULE_REQUIRED, -1, 1 }
#else /* WORKAROUND_ACCEPT_INVALID_VSAI */
							/* ABNF from RFC3588 (including erratum, because original text is nonsense) */
						 	 {  "Vendor-Id", 			RULE_REQUIRED, -1, -1}
#endif /* WORKAROUND_ACCEPT_INVALID_VSAI */
							,{  "Auth-Application-Id",		RULE_OPTIONAL, -1, 1 }
							,{  "Acct-Application-Id",		RULE_OPTIONAL, -1, 1 }
						};
+3 −1
Original line number Diff line number Diff line
@@ -469,8 +469,10 @@ static int save_remote_CE_info(struct msg * msg, struct fd_peer * peer, struct f
						}
						switch (inhdr->avp_code) {
							case AC_VENDOR_ID: /* Vendor-Id */
#ifndef WORKAROUND_ACCEPT_INVALID_VSAI
								if (vid != 0)
									invalid++; /* We already had one such AVP */
									invalid++; /* We already had one such AVP. This is invalid according to RFC6733 but not RFC3588 (but there is an erratum) */
#endif /* WORKAROUND_ACCEPT_INVALID_VSAI */
								vid = inhdr->avp_value->u32;
								break;
							case AC_AUTH_APPLICATION_ID: /* Auth-Application-Id */