Changes in / [960:f39fa6cd86e0:961:d95cd3ca9e8d] in freeDiameter
- Files:
-
- 36 edited
Legend:
- Unmodified
- Added
- Removed
-
.hgtags
r942 r961 31 31 ae96ae28f3ddc48b9e2676e9538008eab2b9d60a 1.1.5 32 32 8500947421cb412b5f4f2dfffdf1a35b6fb369e0 FORK 33 155d45d0653025f45b58ab96b6ba0d5e6fb7fcf8 1.1.6 -
CMakeLists.txt
r880 r929 12 12 SET(FD_PROJECT_VERSION_MAJOR 1) 13 13 SET(FD_PROJECT_VERSION_MINOR 1) 14 SET(FD_PROJECT_VERSION_REV 5)14 SET(FD_PROJECT_VERSION_REV 6) 15 15 16 16 # Version of the API with the library 17 SET(FD_PROJECT_VERSION_API 4)17 SET(FD_PROJECT_VERSION_API 5) 18 18 19 19 # The test framework, using CTest and CDash. -
contrib/debian/changelog
r880 r929 1 freediameter (1.1.6) UNRELEASED; urgency=low 2 3 * Fix major issue in 1.1.5 preventing to send answers to a received message. 4 * New command-line option: --enable_msg_log=( DROPPED | RECEIVED | SENT | NODELIVER | TIMING ) 5 * Improved parsing error handling and Failed-AVP generation. 6 * Added support for some timings measurements in freeDiameter (in the logs) 7 * Fix port handling when using non-default port. 8 * Some cleanups in several dictionary files. 9 * New option to fd_dict_search: AVP_BY_STRUCT 10 * Improved compatibility with C++ compilers. 11 * Cleanups in sessions creation/destruction to avoid memory corruption under stress. 12 * Add support for "include" directive in freeDiameter.conf file. 13 14 -- Sebastien Decugis <sdecugis@freediameter.net> Sun, 03 Mar 2013 07:40:43 +0100 15 1 16 freediameter (1.1.5) UNRELEASED; urgency=low 2 17 -
contrib/debian/update_changelog.txt
r654 r929 1 new release: dch -v 1.0.3 -D UNRELEASED 1 new release: dch -v 1.0.3 -D UNRELEASED --release-heuristic log 2 2 Simple addition: dch "changelog entry text" 3 3 -
doc/freediameter.conf.sample
r873 r925 2 2 3 3 # Only the "TLS_Cred" directive is really mandatory in this file. 4 5 # It is possible to use "include" keyword to import additional files 6 # e.g.: include "/etc/freeDiameter.d/*.conf" 7 4 8 5 9 ############################################################## -
extensions/_sample/hello.cpp
r904 r931 3 3 * Author: Sebastien Decugis <sdecugis@freediameter.net> * 4 4 * * 5 * Copyright (c) 201 1, WIDE Project and NICT *5 * Copyright (c) 2013, WIDE Project and NICT * 6 6 * All rights reserved. * 7 7 * * -
extensions/acl_wl/aw_conf.l
r741 r928 3 3 * Author: Sebastien Decugis <sdecugis@freediameter.net> * 4 4 * * 5 * Copyright (c) 201 1, WIDE Project and NICT *5 * Copyright (c) 2013, WIDE Project and NICT * 6 6 * All rights reserved. * 7 7 * * … … 93 93 } 94 94 95 /* No match */ 96 <*>[[:alnum:]]+ | /* This rule is only useful to print a complete token in error messages */ 97 <*>. { 98 TRACE_DEBUG_ERROR("Unrecognized text on line %d col %d: '%s'.\n", yylloc->first_line, yylloc->first_column, yytext); 99 return LEX_ERROR; 100 } 101 95 102 %% -
extensions/acl_wl/aw_conf.y
r957 r961 3 3 * Author: Sebastien Decugis <sdecugis@freediameter.net> * 4 4 * * 5 * Copyright (c) 201 1, WIDE Project and NICT *5 * Copyright (c) 2013, WIDE Project and NICT * 6 6 * All rights reserved. * 7 7 * * … … 127 127 fqdn_added++; 128 128 } 129 | conffile LEX_ERROR 130 { 131 yyerror(&yylloc, conffile, "An error occurred while parsing the configuration file"); 132 return EINVAL; 133 } 129 134 ; 130 135 -
extensions/app_radgw/rgwx_auth.c
r924 r928 3 3 * Author: Sebastien Decugis <sdecugis@freediameter.net> * 4 4 * * 5 * Copyright (c) 201 1, WIDE Project and NICT *5 * Copyright (c) 2013, WIDE Project and NICT * 6 6 * All rights reserved. * 7 7 * * -
extensions/test_app/ta_bench.c
r924 r928 3 3 * Author: Sebastien Decugis <sdecugis@freediameter.net> * 4 4 * * 5 * Copyright (c) 201 2, WIDE Project and NICT *5 * Copyright (c) 2013, WIDE Project and NICT * 6 6 * All rights reserved. * 7 7 * * -
extensions/test_app/ta_cli.c
r924 r930 3 3 * Author: Sebastien Decugis <sdecugis@freediameter.net> * 4 4 * * 5 * Copyright (c) 201 1, WIDE Project and NICT *5 * Copyright (c) 2013, WIDE Project and NICT * 6 6 * All rights reserved. * 7 7 * * … … 59 59 struct avp * avp; 60 60 struct avp_hdr * hdr; 61 unsigned long dur; 62 int error = 0; 61 63 62 64 CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &ts), return ); … … 80 82 if (avp) { 81 83 CHECK_FCT_DO( fd_msg_avp_hdr( avp, &hdr ), return ); 82 fprintf(stderr, "%x (%s) ", hdr->avp_value->i32, (hdr->avp_value->i32 == mi->randval) ? "Ok" : "PROBLEM"); 84 if (hdr->avp_value->i32 == mi->randval) { 85 fprintf(stderr, "%x (%s) ", hdr->avp_value->i32, "Ok"); 86 } else { 87 fprintf(stderr, "%x (%s) ", hdr->avp_value->i32, "PROBLEM"); 88 error++; 89 } 83 90 } else { 84 91 fprintf(stderr, "no_Test-AVP "); 92 error++; 85 93 } 86 94 … … 90 98 CHECK_FCT_DO( fd_msg_avp_hdr( avp, &hdr ), return ); 91 99 fprintf(stderr, "Status: %d ", hdr->avp_value->i32); 100 if (hdr->avp_value->i32 != 2001) 101 error++; 92 102 } else { 93 103 fprintf(stderr, "no_Result-Code "); 104 error++; 94 105 } 95 106 … … 101 112 } else { 102 113 fprintf(stderr, "no_Origin-Host "); 114 error++; 103 115 } 104 116 … … 110 122 } else { 111 123 fprintf(stderr, "no_Origin-Realm "); 112 } 113 114 /* Now compute how long it took */ 124 error++; 125 } 126 127 CHECK_POSIX_DO( pthread_mutex_lock(&ta_conf->stats_lock), ); 128 dur = ((ts.tv_sec - mi->ts.tv_sec) * 1000000) + ((ts.tv_nsec - mi->ts.tv_nsec) / 1000); 129 if (ta_conf->stats.nb_recv) { 130 /* Ponderate in the avg */ 131 ta_conf->stats.avg = (ta_conf->stats.avg * ta_conf->stats.nb_recv + dur) / (ta_conf->stats.nb_recv + 1); 132 /* Min, max */ 133 if (dur < ta_conf->stats.shortest) 134 ta_conf->stats.shortest = dur; 135 if (dur > ta_conf->stats.longest) 136 ta_conf->stats.longest = dur; 137 } else { 138 ta_conf->stats.shortest = dur; 139 ta_conf->stats.longest = dur; 140 ta_conf->stats.avg = dur; 141 } 142 143 if (error) 144 ta_conf->stats.nb_errs++; 145 else 146 ta_conf->stats.nb_recv++; 147 148 149 CHECK_POSIX_DO( pthread_mutex_unlock(&ta_conf->stats_lock), ); 150 151 /* Display how long it took */ 115 152 if (ts.tv_nsec > mi->ts.tv_nsec) { 116 153 fprintf(stderr, "in %d.%06ld sec", … … 122 159 (long)(1000000000 + ts.tv_nsec - mi->ts.tv_nsec) / 1000); 123 160 } 124 125 161 fprintf(stderr, "\n"); 126 162 fflush(stderr); … … 218 254 CHECK_FCT_DO( fd_msg_send( &req, ta_cb_ans, svg ), goto out ); 219 255 256 /* Increment the counter */ 257 CHECK_POSIX_DO( pthread_mutex_lock(&ta_conf->stats_lock), ); 258 ta_conf->stats.nb_sent++; 259 CHECK_POSIX_DO( pthread_mutex_unlock(&ta_conf->stats_lock), ); 260 220 261 out: 221 262 return; -
freeDiameterd/main.c
r900 r931 3 3 * Author: Sebastien Decugis <sdecugis@freediameter.net> * 4 4 * * 5 * Copyright (c) 201 1, WIDE Project and NICT *5 * Copyright (c) 2013, WIDE Project and NICT * 6 6 * All rights reserved. * 7 7 * * -
include/freeDiameter/CMakeLists.txt
r871 r933 25 25 ENDIF (NOT DIAMID_IDNA_IGNORE) 26 26 27 MARK_AS_ADVANCED(DISABLE_SCTP DEBUG_SCTP SCTP_USE_MAPPED_ADDRESSES ERRORS_ON_TODO DIAMID_IDNA_IGNORE DIAMID_IDNA_REJECT) 27 # Disable expiration of connections with dynamically connected peers as per RFC 3539 ? (default is enabled) 28 # Note: if someone needs, we could also make the delay configurable here... 29 OPTION(DISABLE_PEER_EXPIRY "Disable RFC3539 Peers Connections Expiration after inactivity?" OFF) 30 31 32 MARK_AS_ADVANCED(DISABLE_SCTP DEBUG_SCTP SCTP_USE_MAPPED_ADDRESSES ERRORS_ON_TODO DIAMID_IDNA_IGNORE DIAMID_IDNA_REJECT DISABLE_PEER_EXPIRY) 28 33 29 34 ######################## -
include/freeDiameter/extension.h
r904 r931 3 3 * Author: Sebastien Decugis <sdecugis@freediameter.net> * 4 4 * * 5 * Copyright (c) 201 1, WIDE Project and NICT *5 * Copyright (c) 2013, WIDE Project and NICT * 6 6 * All rights reserved. * 7 7 * * -
include/freeDiameter/freeDiameter-host.h.in
r904 r933 59 59 #cmakedefine DIAMID_IDNA_IGNORE 60 60 #cmakedefine DIAMID_IDNA_REJECT 61 #cmakedefine DISABLE_PEER_EXPIRY 61 62 #cmakedefine GNUTLS_VERSION_210 62 63 #cmakedefine GNUTLS_VERSION_300 -
include/freeDiameter/libfdproto.h
r958 r961 3 3 * Author: Sebastien Decugis <sdecugis@freediameter.net> * 4 4 * * 5 * Copyright (c) 201 2, WIDE Project and NICT *5 * Copyright (c) 2013, WIDE Project and NICT * 6 6 * All rights reserved. * 7 7 * * -
libfdcore/cnxctx.c
r946 r961 3 3 * Author: Sebastien Decugis <sdecugis@freediameter.net> * 4 4 * * 5 * Copyright (c) 201 2, WIDE Project and NICT *5 * Copyright (c) 2013, WIDE Project and NICT * 6 6 * All rights reserved. * 7 7 * * … … 561 561 continue; 562 562 563 if (cur->ifa_addr == NULL) /* may happen with ppp interfaces */ 564 continue; 565 563 566 if (fd_g_config->cnf_flags.no_ip4 && (cur->ifa_addr->sa_family == AF_INET)) 564 567 continue; -
libfdcore/core.c
r947 r961 3 3 * Author: Sebastien Decugis <sdecugis@freediameter.net> * 4 4 * * 5 * Copyright (c) 201 2, WIDE Project and NICT *5 * Copyright (c) 2013, WIDE Project and NICT * 6 6 * All rights reserved. * 7 7 * * -
libfdcore/dict_base_proto.c
r922 r928 3 3 * Author: Sebastien Decugis <sdecugis@freediameter.net> * 4 4 * * 5 * Copyright (c) 201 2, WIDE Project and NICT *5 * Copyright (c) 2013, WIDE Project and NICT * 6 6 * All rights reserved. * 7 7 * * -
libfdcore/fdcore-internal.h
r909 r928 3 3 * Author: Sebastien Decugis <sdecugis@freediameter.net> * 4 4 * * 5 * Copyright (c) 201 2, WIDE Project and NICT *5 * Copyright (c) 2013, WIDE Project and NICT * 6 6 * All rights reserved. * 7 7 * * -
libfdcore/fdd.l
r950 r961 3 3 * Author: Sebastien Decugis <sdecugis@freediameter.net> * 4 4 * * 5 * Copyright (c) 201 1, WIDE Project and NICT *5 * Copyright (c) 2013, WIDE Project and NICT * 6 6 * All rights reserved. * 7 7 * * … … 67 67 /* %option noinput ? */ 68 68 #define YY_NO_INPUT 69 70 /* Additional for files inclusion */ 71 #include <glob.h> 72 #include <string.h> 73 74 #define MAX_NESTED_CONF_FILES 5 75 76 struct nested_conffiles_t { 77 YY_BUFFER_STATE parent_level_state; 78 glob_t filelist; 79 int current_file; 80 } nested_conffiles[MAX_NESTED_CONF_FILES]; 81 82 int current_nested_level = 0; 83 84 int globerrfct(const char *epath, int eerrno) 85 { 86 TRACE_DEBUG_ERROR("Failed to scan %s: %s\n", epath, strerror(eerrno)); 87 return 1; 88 } 89 69 90 %} 70 91 … … 73 94 %option nounput 74 95 96 %x in_include 97 75 98 /* Quoted string. Multilines do not match. */ 76 99 qstring \"[^\"\n]*\" 77 100 78 101 %% 79 80 102 <*>\n { 81 103 /* Update the line count */ … … 87 109 <*>([[:space:]]{-}[\n])+ ; /* Eat all spaces, not new lines */ 88 110 <*>#.*$ ; /* Eat all comments */ 111 112 113 include BEGIN(in_include); 114 /* Following an "include" keyword */ 115 <in_include>{ 116 {qstring} { /* Name of the file to include. This is directly sent to glob. */ 117 int globerror=0; 118 char * buf = strdup(yytext+1); 119 if (buf[yyleng-2] != '"') 120 { 121 TRACE_DEBUG_ERROR("Unterminated string: %s\n", yytext); 122 return LEX_ERROR; 123 } 124 buf[yyleng-2] = '\0'; 125 126 if (current_nested_level >= MAX_NESTED_CONF_FILES) 127 { 128 TRACE_DEBUG_ERROR("Too many recursion levels in configuration files includes\n"); 129 return LEX_ERROR; 130 } 131 132 /* glob the include */ 133 globerror = glob(buf, GLOB_ERR, globerrfct, &nested_conffiles[current_nested_level].filelist); 134 135 if (globerror == GLOB_NOSPACE) 136 { 137 TRACE_DEBUG_ERROR("Not enough memory to parse include directive.\n"); 138 return LEX_ERROR; 139 } 140 if (globerror == GLOB_ABORTED) 141 { 142 TRACE_DEBUG_ERROR("An error was encountered in include directive.\n"); 143 return LEX_ERROR; 144 } 145 if (globerror == GLOB_NOMATCH) 146 { 147 globfree(&nested_conffiles[current_nested_level].filelist); 148 goto nomatch; 149 } 150 if (globerror) 151 { 152 TRACE_DEBUG_ERROR("Unexpected error in glob (%d).\n", globerror); 153 return LEX_ERROR; 154 } 155 156 /* We have a list of files to include. */ 157 158 /* save the current buffer for returning when this include has been parsed */ 159 nested_conffiles[current_nested_level].parent_level_state = YY_CURRENT_BUFFER; 160 161 /* Start with the first match */ 162 nested_conffiles[current_nested_level].current_file = 0; 163 164 yyin = fopen( nested_conffiles[current_nested_level].filelist.gl_pathv[0], "r" ); 165 166 if ( ! yyin ) 167 { 168 TRACE_DEBUG_ERROR("Error in %s: %s", nested_conffiles[current_nested_level].filelist.gl_pathv[0], strerror(errno)); 169 return LEX_ERROR; 170 } 171 172 yy_switch_to_buffer(yy_create_buffer( yyin, YY_BUF_SIZE )); 173 174 /* In case of recursive includes */ 175 current_nested_level++; 176 177 nomatch: 178 BEGIN(INITIAL); 179 } 180 } 181 182 <<EOF>> { 183 if (current_nested_level == 0) 184 { 185 /* We are at the end of parsing */ 186 yyterminate(); 187 } 188 189 /* Otherwise we are doing an include statement */ 190 --current_nested_level; 191 yy_delete_buffer(YY_CURRENT_BUFFER); 192 193 /* Go to next file, if any */ 194 nested_conffiles[current_nested_level].current_file++; 195 if ( nested_conffiles[current_nested_level].filelist.gl_pathv[nested_conffiles[current_nested_level].current_file] == NULL ) 196 { 197 /* We have finished with this list of includes */ 198 globfree(&nested_conffiles[current_nested_level].filelist); 199 yy_switch_to_buffer(nested_conffiles[current_nested_level].parent_level_state); 200 } 201 else 202 { 203 /* Proceed to next included file */ 204 yyin = fopen( nested_conffiles[current_nested_level].filelist.gl_pathv[nested_conffiles[current_nested_level].current_file], "r" ); 205 206 if ( ! yyin ) 207 { 208 TRACE_DEBUG_ERROR("Error in %s: %s", nested_conffiles[current_nested_level].filelist.gl_pathv[nested_conffiles[current_nested_level].current_file], strerror(errno)); 209 return LEX_ERROR; 210 } 211 212 yy_switch_to_buffer(yy_create_buffer( yyin, YY_BUF_SIZE )); 213 214 /* In case of recursive includes */ 215 current_nested_level++; 216 } 217 218 } 89 219 90 220 {qstring} { -
libfdcore/fdd.y
r950 r961 3 3 * Author: Sebastien Decugis <sdecugis@freediameter.net> * 4 4 * * 5 * Copyright (c) 201 2, WIDE Project and NICT *5 * Copyright (c) 2013, WIDE Project and NICT * 6 6 * All rights reserved. * 7 7 * * -
libfdcore/messages.c
r924 r928 3 3 * Author: Sebastien Decugis <sdecugis@freediameter.net> * 4 4 * * 5 * Copyright (c) 201 2, WIDE Project and NICT *5 * Copyright (c) 2013, WIDE Project and NICT * 6 6 * All rights reserved. * 7 7 * * -
libfdcore/p_cnx.c
r897 r931 3 3 * Author: Sebastien Decugis <sdecugis@freediameter.net> * 4 4 * * 5 * Copyright (c) 201 1, WIDE Project and NICT *5 * Copyright (c) 2013, WIDE Project and NICT * 6 6 * All rights reserved. * 7 7 * * -
libfdcore/p_out.c
r895 r931 3 3 * Author: Sebastien Decugis <sdecugis@freediameter.net> * 4 4 * * 5 * Copyright (c) 201 1, WIDE Project and NICT *5 * Copyright (c) 2013, WIDE Project and NICT * 6 6 * All rights reserved. * 7 7 * * -
libfdcore/p_psm.c
r895 r931 3 3 * Author: Sebastien Decugis <sdecugis@freediameter.net> * 4 4 * * 5 * Copyright (c) 201 1, WIDE Project and NICT *5 * Copyright (c) 2013, WIDE Project and NICT * 6 6 * All rights reserved. * 7 7 * * -
libfdcore/peers.c
r950 r961 3 3 * Author: Sebastien Decugis <sdecugis@freediameter.net> * 4 4 * * 5 * Copyright (c) 201 2, WIDE Project and NICT *5 * Copyright (c) 2013, WIDE Project and NICT * 6 6 * All rights reserved. * 7 7 * * … … 515 515 peer->p_flags.pf_delete = 1; 516 516 517 #ifndef DISABLE_PEER_EXPIRY 517 518 /* Set this peer to expire on inactivity */ 518 519 peer->p_hdr.info.config.pic_flags.exp = PI_EXP_INACTIVE; 519 520 peer->p_hdr.info.config.pic_lft = 3600; /* 1 hour without any message 520 521 -- RFC3539 states that this must not be inferior to BRINGDOWN_INTERVAL = 5 minutes */ 522 521 523 CHECK_FCT_DO( ret = fd_p_expi_update( peer ), goto out ); 522 524 #endif /* DISABLE_PEER_EXPIRY */ 523 525 524 526 /* Insert the new peer in the list (the PSM will take care of setting the expiry after validation) */ -
libfdcore/sctp.c
r950 r961 3 3 * Author: Sebastien Decugis <sdecugis@freediameter.net> * 4 4 * * 5 * Copyright (c) 201 2, WIDE Project and NICT *5 * Copyright (c) 2013, WIDE Project and NICT * 6 6 * All rights reserved. * 7 7 * * -
libfdcore/server.c
r901 r931 3 3 * Author: Sebastien Decugis <sdecugis@freediameter.net> * 4 4 * * 5 * Copyright (c) 201 1, WIDE Project and NICT *5 * Copyright (c) 2013, WIDE Project and NICT * 6 6 * All rights reserved. * 7 7 * * -
libfdproto/dictionary.c
r952 r961 3 3 * Author: Sebastien Decugis <sdecugis@freediameter.net> * 4 4 * * 5 * Copyright (c) 201 2, WIDE Project and NICT *5 * Copyright (c) 2013, WIDE Project and NICT * 6 6 * All rights reserved. * 7 7 * * -
libfdproto/fdproto-internal.h
r924 r928 3 3 * Author: Sebastien Decugis <sdecugis@freediameter.net> * 4 4 * * 5 * Copyright (c) 201 2, WIDE Project and NICT *5 * Copyright (c) 2013, WIDE Project and NICT * 6 6 * All rights reserved. * 7 7 * * -
libfdproto/log.c
r945 r961 3 3 * Author: Sebastien Decugis <sdecugis@freediameter.net> * 4 4 * * 5 * Copyright (c) 201 2, WIDE Project and NICT *5 * Copyright (c) 2013, WIDE Project and NICT * 6 6 * All rights reserved. * 7 7 * * -
libfdproto/messages.c
r951 r961 3 3 * Author: Sebastien Decugis <sdecugis@freediameter.net> * 4 4 * * 5 * Copyright (c) 201 2, WIDE Project and NICT *5 * Copyright (c) 2013, WIDE Project and NICT * 6 6 * All rights reserved. * 7 7 * * -
libfdproto/msg_log.c
r911 r928 3 3 * Author: Sebastien Decugis <sdecugis@freediameter.net> * 4 4 * * 5 * Copyright (c) 201 1, WIDE Project and NICT *5 * Copyright (c) 2013, WIDE Project and NICT * 6 6 * All rights reserved. * 7 7 * * -
libfdproto/sessions.c
r924 r928 3 3 * Author: Sebastien Decugis <sdecugis@freediameter.net> * 4 4 * * 5 * Copyright (c) 201 2, WIDE Project and NICT *5 * Copyright (c) 2013, WIDE Project and NICT * 6 6 * All rights reserved. * 7 7 * * -
tests/testmesg.c
r892 r931 3 3 * Author: Sebastien Decugis <sdecugis@freediameter.net> * 4 4 * * 5 * Copyright (c) 201 1, WIDE Project and NICT *5 * Copyright (c) 2013, WIDE Project and NICT * 6 6 * All rights reserved. * 7 7 * *
Note: See TracChangeset
for help on using the changeset viewer.