Changeset 974:2091bf698fb1 in freeDiameter for libfdcore
- Timestamp:
- Mar 15, 2013, 2:14:35 AM (11 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- libfdcore
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
libfdcore/cnxctx.c
r961 r974 231 231 char buf[1024]; 232 232 sSA_DUMP_NODE( buf, sizeof(buf), &ss, NI_NUMERICHOST ); 233 fd_log_debug("%s : accepted new client [%s]. \n", fd_cnx_getid(serv), buf);233 fd_log_debug("%s : accepted new client [%s].", fd_cnx_getid(serv), buf); 234 234 } 235 235 … … 314 314 char buf[1024]; 315 315 sSA_DUMP_NODE_SERV( buf, sizeof(buf), sa, NI_NUMERICSERV); 316 fd_log_debug("Connection established to server '%s' (TCP:%d). \n", buf, sock);316 fd_log_debug("Connection established to server '%s' (TCP:%d).", buf, sock); 317 317 } 318 318 … … 406 406 char buf[1024]; 407 407 sSA_DUMP_NODE_SERV( buf, sizeof(buf), &primary, NI_NUMERICSERV); 408 fd_log_debug("Connection established to server '%s' (SCTP:%d, %d/%d streams). \n", buf, sock, cnx->cc_sctp_para.str_in, cnx->cc_sctp_para.str_out);408 fd_log_debug("Connection established to server '%s' (SCTP:%d, %d/%d streams).", buf, sock, cnx->cc_sctp_para.str_in, cnx->cc_sctp_para.str_out); 409 409 } 410 410 … … 857 857 { 858 858 if (TRACE_BOOL(INFO)) { 859 fd_log_debug("TLS re-handshake failed on socket %d (%s) : %s \n", conn->cc_socket, conn->cc_id, gnutls_strerror(ret));859 fd_log_debug("TLS re-handshake failed on socket %d (%s) : %s", conn->cc_socket, conn->cc_id, gnutls_strerror(ret)); 860 860 } 861 861 goto end; … … 902 902 { 903 903 if (TRACE_BOOL(INFO)) { 904 fd_log_debug("TLS re-handshake failed on socket %d (%s) : %s \n", conn->cc_socket, conn->cc_id, gnutls_strerror(ret));904 fd_log_debug("TLS re-handshake failed on socket %d (%s) : %s", conn->cc_socket, conn->cc_id, gnutls_strerror(ret)); 905 905 } 906 906 goto end; … … 1038 1038 const char * errorpos; 1039 1039 CHECK_GNUTLS_DO( gnutls_priority_set_direct( *session, priority, &errorpos ), 1040 { TRACE_DEBUG(INFO, "Error in priority string '%s' at position: '%s' \n", priority, errorpos); return EINVAL; } );1040 { TRACE_DEBUG(INFO, "Error in priority string '%s' at position: '%s'", priority, errorpos); return EINVAL; } ); 1041 1041 } else { 1042 1042 CHECK_GNUTLS_DO( gnutls_priority_set( *session, fd_g_config->cnf_sec_data.prio_cache ), return EINVAL ); … … 1075 1075 gnutls_credentials_type_t cred; 1076 1076 1077 fd_log_debug("TLS Session information for connection '%s': \n", conn->cc_id);1077 fd_log_debug("TLS Session information for connection '%s':", conn->cc_id); 1078 1078 1079 1079 /* print the key exchange's algorithm name */ 1080 1080 GNUTLS_TRACE( kx = gnutls_kx_get (session) ); 1081 1081 GNUTLS_TRACE( tmp = gnutls_kx_get_name (kx) ); 1082 fd_log_debug("\t - Key Exchange: %s \n", tmp);1082 fd_log_debug("\t - Key Exchange: %s", tmp); 1083 1083 1084 1084 /* Check the authentication type used and switch … … 1088 1088 { 1089 1089 case GNUTLS_CRD_IA: 1090 fd_log_debug("\t - TLS/IA session \n");1090 fd_log_debug("\t - TLS/IA session"); 1091 1091 break; 1092 1092 … … 1094 1094 /* This returns NULL in server side. */ 1095 1095 if (gnutls_psk_client_get_hint (session) != NULL) 1096 fd_log_debug("\t - PSK authentication. PSK hint '%s' \n",1096 fd_log_debug("\t - PSK authentication. PSK hint '%s'", 1097 1097 gnutls_psk_client_get_hint (session)); 1098 1098 /* This returns NULL in client side. */ 1099 1099 if (gnutls_psk_server_get_username (session) != NULL) 1100 fd_log_debug("\t - PSK authentication. Connected as '%s' \n",1100 fd_log_debug("\t - PSK authentication. Connected as '%s'", 1101 1101 gnutls_psk_server_get_username (session)); 1102 1102 break; 1103 1103 1104 1104 case GNUTLS_CRD_ANON: /* anonymous authentication */ 1105 fd_log_debug("\t - Anonymous DH using prime of %d bits \n",1105 fd_log_debug("\t - Anonymous DH using prime of %d bits", 1106 1106 gnutls_dh_get_prime_bits (session)); 1107 1107 break; … … 1110 1110 /* Check if we have been using ephemeral Diffie-Hellman. */ 1111 1111 if (kx == GNUTLS_KX_DHE_RSA || kx == GNUTLS_KX_DHE_DSS) { 1112 fd_log_debug("\t - Ephemeral DH using prime of %d bits \n",1112 fd_log_debug("\t - Ephemeral DH using prime of %d bits", 1113 1113 gnutls_dh_get_prime_bits (session)); 1114 1114 } … … 1116 1116 #ifdef ENABLE_SRP 1117 1117 case GNUTLS_CRD_SRP: 1118 fd_log_debug("\t - SRP session with username %s \n",1118 fd_log_debug("\t - SRP session with username %s", 1119 1119 gnutls_srp_server_get_username (session)); 1120 1120 break; … … 1122 1122 1123 1123 default: 1124 fd_log_debug("\t - Different type of credentials for the session (%d). \n", cred);1124 fd_log_debug("\t - Different type of credentials for the session (%d).", cred); 1125 1125 break; 1126 1126 … … 1129 1129 /* print the protocol's name (ie TLS 1.0) */ 1130 1130 tmp = gnutls_protocol_get_name (gnutls_protocol_get_version (session)); 1131 fd_log_debug("\t - Protocol: %s \n", tmp);1131 fd_log_debug("\t - Protocol: %s", tmp); 1132 1132 1133 1133 /* print the certificate type of the peer. ie X.509 */ 1134 1134 tmp = gnutls_certificate_type_get_name (gnutls_certificate_type_get (session)); 1135 fd_log_debug("\t - Certificate Type: %s \n", tmp);1135 fd_log_debug("\t - Certificate Type: %s", tmp); 1136 1136 1137 1137 /* print the compression algorithm (if any) */ 1138 1138 tmp = gnutls_compression_get_name (gnutls_compression_get (session)); 1139 fd_log_debug("\t - Compression: %s \n", tmp);1139 fd_log_debug("\t - Compression: %s", tmp); 1140 1140 1141 1141 /* print the name of the cipher used. ie 3DES. */ 1142 1142 tmp = gnutls_cipher_get_name (gnutls_cipher_get (session)); 1143 fd_log_debug("\t - Cipher: %s \n", tmp);1143 fd_log_debug("\t - Cipher: %s", tmp); 1144 1144 1145 1145 /* Print the MAC algorithms name. ie SHA1 */ 1146 1146 tmp = gnutls_mac_get_name (gnutls_mac_get (session)); 1147 fd_log_debug("\t - MAC: %s \n", tmp);1147 fd_log_debug("\t - MAC: %s", tmp); 1148 1148 } 1149 1149 … … 1152 1152 if (gtret) { 1153 1153 if (TRACE_BOOL(INFO)) { 1154 fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') : \n", conn->cc_socket, conn->cc_remid, conn->cc_id);1154 fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id); 1155 1155 if (gtret & GNUTLS_CERT_INVALID) 1156 fd_log_debug(" - The certificate is not trusted (unknown CA? expired?) \n");1156 fd_log_debug(" - The certificate is not trusted (unknown CA? expired?)"); 1157 1157 if (gtret & GNUTLS_CERT_REVOKED) 1158 fd_log_debug(" - The certificate has been revoked. \n");1158 fd_log_debug(" - The certificate has been revoked."); 1159 1159 if (gtret & GNUTLS_CERT_SIGNER_NOT_FOUND) 1160 fd_log_debug(" - The certificate hasn't got a known issuer. \n");1160 fd_log_debug(" - The certificate hasn't got a known issuer."); 1161 1161 if (gtret & GNUTLS_CERT_SIGNER_NOT_CA) 1162 fd_log_debug(" - The certificate signer is not a CA, or uses version 1, or 3 without basic constraints. \n");1162 fd_log_debug(" - The certificate signer is not a CA, or uses version 1, or 3 without basic constraints."); 1163 1163 if (gtret & GNUTLS_CERT_INSECURE_ALGORITHM) 1164 fd_log_debug(" - The certificate signature uses a weak algorithm. \n");1164 fd_log_debug(" - The certificate signature uses a weak algorithm."); 1165 1165 } 1166 1166 return EINVAL; … … 1184 1184 time_t expiration_time, activation_time; 1185 1185 1186 fd_log_debug("TLS Certificate information for connection '%s' (%d certs provided): \n", conn->cc_id, cert_list_size);1186 fd_log_debug("TLS Certificate information for connection '%s' (%d certs provided):", conn->cc_id, cert_list_size); 1187 1187 for (i = 0; i < cert_list_size; i++) 1188 1188 { … … 1191 1191 CHECK_GNUTLS_DO( gnutls_x509_crt_import (cert, &cert_list[i], GNUTLS_X509_FMT_DER), return EINVAL); 1192 1192 1193 fd_log_debug(" Certificate %d info: \n", i);1193 fd_log_debug(" Certificate %d info:", i); 1194 1194 1195 1195 GNUTLS_TRACE( expiration_time = gnutls_x509_crt_get_expiration_time (cert) ); … … 1203 1203 gnutls_x509_crt_get_serial (cert, serial, &size); 1204 1204 1205 fd_log_debug("\t - Certificate serial number: ");1206 1205 { 1207 1206 int j; 1207 char buf[1024]; 1208 snprintf(buf, sizeof(buf), "\t - Certificate serial number: "); 1208 1209 for (j = 0; j < size; j++) { 1209 fd_log_debug("%02.2hhx", serial[j]);1210 snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), "%02.2hhx", serial[j]); 1210 1211 } 1211 }1212 fd_log_debug("\n");1212 fd_log_debug(buf); 1213 } 1213 1214 1214 1215 /* Extract some of the public key algorithm's parameters */ 1215 1216 GNUTLS_TRACE( algo = gnutls_x509_crt_get_pk_algorithm (cert, &bits) ); 1216 fd_log_debug("\t - Certificate public key: %s \n",1217 fd_log_debug("\t - Certificate public key: %s", 1217 1218 gnutls_pk_algorithm_get_name (algo)); 1218 1219 1219 1220 /* Print the version of the X.509 certificate. */ 1220 fd_log_debug("\t - Certificate version: #%d \n",1221 fd_log_debug("\t - Certificate version: #%d", 1221 1222 gnutls_x509_crt_get_version (cert)); 1222 1223 1223 1224 size = sizeof (dn); 1224 1225 GNUTLS_TRACE( gnutls_x509_crt_get_dn (cert, dn, &size) ); 1225 fd_log_debug("\t - DN: %s \n", dn);1226 fd_log_debug("\t - DN: %s", dn); 1226 1227 1227 1228 size = sizeof (dn); 1228 1229 GNUTLS_TRACE( gnutls_x509_crt_get_issuer_dn (cert, dn, &size) ); 1229 fd_log_debug("\t - Issuer's DN: %s \n", dn);1230 fd_log_debug("\t - Issuer's DN: %s", dn); 1230 1231 1231 1232 GNUTLS_TRACE( gnutls_x509_crt_deinit (cert) ); … … 1244 1245 if ((deadline != (time_t)-1) && (deadline < now)) { 1245 1246 if (TRACE_BOOL(INFO)) { 1246 fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') : \n", conn->cc_socket, conn->cc_remid, conn->cc_id);1247 fd_log_debug(" - The certificate %d in the chain is expired \n", i);1247 fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id); 1248 fd_log_debug(" - The certificate %d in the chain is expired", i); 1248 1249 } 1249 1250 ret = EINVAL; … … 1253 1254 if ((deadline != (time_t)-1) && (deadline > now)) { 1254 1255 if (TRACE_BOOL(INFO)) { 1255 fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') : \n", conn->cc_socket, conn->cc_remid, conn->cc_id);1256 fd_log_debug(" - The certificate %d in the chain is not yet activated \n", i);1256 fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id); 1257 fd_log_debug(" - The certificate %d in the chain is not yet activated", i); 1257 1258 } 1258 1259 ret = EINVAL; … … 1262 1263 if (!gnutls_x509_crt_check_hostname (cert, conn->cc_tls_para.cn)) { 1263 1264 if (TRACE_BOOL(INFO)) { 1264 fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') : \n", conn->cc_socket, conn->cc_remid, conn->cc_id);1265 fd_log_debug(" - The certificate hostname does not match '%s' \n", conn->cc_tls_para.cn);1265 fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id); 1266 fd_log_debug(" - The certificate hostname does not match '%s'", conn->cc_tls_para.cn); 1266 1267 } 1267 1268 ret = EINVAL; … … 1302 1303 dhe = ecdh = 0; 1303 1304 1304 fd_log_debug("TLS Session information for connection '%s': \n", conn->cc_id);1305 fd_log_debug("TLS Session information for connection '%s':", conn->cc_id); 1305 1306 1306 1307 /* print the key exchange's algorithm name … … 1308 1309 GNUTLS_TRACE( kx = gnutls_kx_get (session) ); 1309 1310 GNUTLS_TRACE( tmp = gnutls_kx_get_name (kx) ); 1310 fd_log_debug("\t- Key Exchange: %s \n", tmp);1311 fd_log_debug("\t- Key Exchange: %s", tmp); 1311 1312 1312 1313 /* Check the authentication type used and switch … … 1317 1318 { 1318 1319 case GNUTLS_CRD_IA: 1319 fd_log_debug("\t - TLS/IA session \n");1320 fd_log_debug("\t - TLS/IA session"); 1320 1321 break; 1321 1322 … … 1323 1324 #if (defined(ENABLE_SRP) || defined(GNUTLS_VERSION_300)) 1324 1325 case GNUTLS_CRD_SRP: 1325 fd_log_debug("\t - SRP session with username %s \n",1326 fd_log_debug("\t - SRP session with username %s", 1326 1327 gnutls_srp_server_get_username (session)); 1327 1328 break; … … 1332 1333 */ 1333 1334 if (gnutls_psk_client_get_hint (session) != NULL) 1334 fd_log_debug("\t - PSK authentication. PSK hint '%s' \n",1335 fd_log_debug("\t - PSK authentication. PSK hint '%s'", 1335 1336 gnutls_psk_client_get_hint (session)); 1336 1337 /* This returns NULL in client side. 1337 1338 */ 1338 1339 if (gnutls_psk_server_get_username (session) != NULL) 1339 fd_log_debug("\t - PSK authentication. Connected as '%s' \n",1340 fd_log_debug("\t - PSK authentication. Connected as '%s'", 1340 1341 gnutls_psk_server_get_username (session)); 1341 1342 … … 1347 1348 1348 1349 case GNUTLS_CRD_ANON: /* anonymous authentication */ 1349 fd_log_debug("\t - Anonymous DH using prime of %d bits \n",1350 fd_log_debug("\t - Anonymous DH using prime of %d bits", 1350 1351 gnutls_dh_get_prime_bits (session)); 1351 1352 if (kx == GNUTLS_KX_ANON_ECDH) … … 1370 1371 cert_list = gnutls_certificate_get_peers (session, &cert_list_size); 1371 1372 1372 fd_log_debug("\t Peer provided %d certificates. \n", cert_list_size);1373 fd_log_debug("\t Peer provided %d certificates.", cert_list_size); 1373 1374 1374 1375 if (cert_list_size > 0) … … 1382 1383 gnutls_x509_crt_import (cert, &cert_list[0], GNUTLS_X509_FMT_DER); 1383 1384 1384 fd_log_debug("\t Certificate info: \n");1385 fd_log_debug("\t Certificate info:"); 1385 1386 1386 1387 /* This is the preferred way of printing short information about … … 1390 1391 if (ret == 0) 1391 1392 { 1392 fd_log_debug("\t\t%s \n", cinfo.data);1393 fd_log_debug("\t\t%s", cinfo.data); 1393 1394 gnutls_free (cinfo.data); 1394 1395 } … … 1396 1397 if (conn->cc_tls_para.cn) { 1397 1398 if (!gnutls_x509_crt_check_hostname (cert, conn->cc_tls_para.cn)) { 1398 fd_log_debug("\tTLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') : \n", conn->cc_socket, conn->cc_remid, conn->cc_id);1399 fd_log_debug("\t - The certificate hostname does not match '%s' \n", conn->cc_tls_para.cn);1399 fd_log_debug("\tTLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id); 1400 fd_log_debug("\t - The certificate hostname does not match '%s'", conn->cc_tls_para.cn); 1400 1401 gnutls_x509_crt_deinit (cert); 1401 1402 return GNUTLS_E_CERTIFICATE_ERROR; … … 1415 1416 1416 1417 if (ecdh != 0) 1417 fd_log_debug("\t - Ephemeral ECDH using curve %s \n",1418 fd_log_debug("\t - Ephemeral ECDH using curve %s", 1418 1419 gnutls_ecc_curve_get_name (gnutls_ecc_curve_get (session))); 1419 1420 else if (dhe != 0) 1420 fd_log_debug("\t - Ephemeral DH using prime of %d bits \n",1421 fd_log_debug("\t - Ephemeral DH using prime of %d bits", 1421 1422 gnutls_dh_get_prime_bits (session)); 1422 1423 … … 1424 1425 */ 1425 1426 tmp = gnutls_protocol_get_name (gnutls_protocol_get_version (session)); 1426 fd_log_debug("\t - Protocol: %s \n", tmp);1427 fd_log_debug("\t - Protocol: %s", tmp); 1427 1428 1428 1429 /* print the certificate type of the peer. … … 1430 1431 */ 1431 1432 tmp = gnutls_certificate_type_get_name (gnutls_certificate_type_get (session)); 1432 fd_log_debug("\t - Certificate Type: %s \n", tmp);1433 fd_log_debug("\t - Certificate Type: %s", tmp); 1433 1434 1434 1435 /* print the compression algorithm (if any) 1435 1436 */ 1436 1437 tmp = gnutls_compression_get_name (gnutls_compression_get (session)); 1437 fd_log_debug("\t - Compression: %s \n", tmp);1438 fd_log_debug("\t - Compression: %s", tmp); 1438 1439 1439 1440 /* print the name of the cipher used. … … 1441 1442 */ 1442 1443 tmp = gnutls_cipher_get_name (gnutls_cipher_get (session)); 1443 fd_log_debug("\t - Cipher: %s \n", tmp);1444 fd_log_debug("\t - Cipher: %s", tmp); 1444 1445 1445 1446 /* Print the MAC algorithms name. … … 1447 1448 */ 1448 1449 tmp = gnutls_mac_get_name (gnutls_mac_get (session)); 1449 fd_log_debug("\t - MAC: %s \n", tmp);1450 fd_log_debug("\t - MAC: %s", tmp); 1450 1451 1451 1452 } … … 1456 1457 CHECK_GNUTLS_DO( gnutls_certificate_verify_peers2 (session, &status), return GNUTLS_E_CERTIFICATE_ERROR ); 1457 1458 if (TRACE_BOOL(INFO) && (status & GNUTLS_CERT_INVALID)) { 1458 fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') : \n", conn->cc_socket, conn->cc_remid, conn->cc_id);1459 fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id); 1459 1460 if (status & GNUTLS_CERT_SIGNER_NOT_FOUND) 1460 fd_log_debug(" - The certificate hasn't got a known issuer. \n");1461 fd_log_debug(" - The certificate hasn't got a known issuer."); 1461 1462 1462 1463 if (status & GNUTLS_CERT_REVOKED) 1463 fd_log_debug(" - The certificate has been revoked. \n");1464 fd_log_debug(" - The certificate has been revoked."); 1464 1465 1465 1466 if (status & GNUTLS_CERT_EXPIRED) 1466 fd_log_debug(" - The certificate has expired. \n");1467 fd_log_debug(" - The certificate has expired."); 1467 1468 1468 1469 if (status & GNUTLS_CERT_NOT_ACTIVATED) 1469 fd_log_debug(" - The certificate is not yet activated. \n");1470 fd_log_debug(" - The certificate is not yet activated."); 1470 1471 } 1471 1472 if (status & GNUTLS_CERT_INVALID) … … 1480 1481 if ((!hostname_verified) && (conn->cc_tls_para.cn)) { 1481 1482 if (gnutls_certificate_type_get (session) != GNUTLS_CRT_X509) { 1482 TRACE_DEBUG(INFO, "TLS: Remote credentials are not x509, rejected on socket %d (Remote: '%s')(Connection: '%s') : \n", conn->cc_socket, conn->cc_remid, conn->cc_id);1483 TRACE_DEBUG(INFO, "TLS: Remote credentials are not x509, rejected on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id); 1483 1484 return GNUTLS_E_CERTIFICATE_ERROR; 1484 1485 } … … 1493 1494 if (!gnutls_x509_crt_check_hostname (cert, conn->cc_tls_para.cn)) { 1494 1495 if (TRACE_BOOL(INFO)) { 1495 fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') : \n", conn->cc_socket, conn->cc_remid, conn->cc_id);1496 fd_log_debug(" - The certificate hostname does not match '%s' \n", conn->cc_tls_para.cn);1496 fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id); 1497 fd_log_debug(" - The certificate hostname does not match '%s'", conn->cc_tls_para.cn); 1497 1498 } 1498 1499 gnutls_x509_crt_deinit (cert); … … 1573 1574 { 1574 1575 if (TRACE_BOOL(INFO)) { 1575 fd_log_debug("TLS Handshake failed on socket %d (%s) : %s \n", conn->cc_socket, conn->cc_id, gnutls_strerror(ret));1576 fd_log_debug("TLS Handshake failed on socket %d (%s) : %s", conn->cc_socket, conn->cc_id, gnutls_strerror(ret)); 1576 1577 } 1577 1578 fd_cnx_markerror(conn); -
libfdcore/config.c
r965 r974 86 86 return; 87 87 88 fd_log_debug("-- Configuration : \n");89 fd_log_debug(" Debug trace level ...... : %+d \n", fd_g_debug_lvl);90 fd_log_debug(" Configuration file ..... : %s \n", fd_g_config->cnf_file);91 fd_log_debug(" Diameter Identity ...... : %s (l:%Zi) \n", fd_g_config->cnf_diamid, fd_g_config->cnf_diamid_len);92 fd_log_debug(" Diameter Realm ......... : %s (l:%Zi) \n", fd_g_config->cnf_diamrlm, fd_g_config->cnf_diamrlm_len);93 fd_log_debug(" Tc Timer ............... : %u \n", fd_g_config->cnf_timer_tc);94 fd_log_debug(" Tw Timer ............... : %u \n", fd_g_config->cnf_timer_tw);95 fd_log_debug(" Local port ............. : %hu \n", fd_g_config->cnf_port);96 fd_log_debug(" Local secure port ...... : %hu \n", fd_g_config->cnf_port_tls);97 fd_log_debug(" Number of SCTP streams . : %hu \n", fd_g_config->cnf_sctp_str);98 fd_log_debug(" Number of server threads : %hu \n", fd_g_config->cnf_dispthr);88 fd_log_debug("-- Configuration :"); 89 fd_log_debug(" Debug trace level ...... : %+d", fd_g_debug_lvl); 90 fd_log_debug(" Configuration file ..... : %s", fd_g_config->cnf_file); 91 fd_log_debug(" Diameter Identity ...... : %s (l:%Zi)", fd_g_config->cnf_diamid, fd_g_config->cnf_diamid_len); 92 fd_log_debug(" Diameter Realm ......... : %s (l:%Zi)", fd_g_config->cnf_diamrlm, fd_g_config->cnf_diamrlm_len); 93 fd_log_debug(" Tc Timer ............... : %u", fd_g_config->cnf_timer_tc); 94 fd_log_debug(" Tw Timer ............... : %u", fd_g_config->cnf_timer_tw); 95 fd_log_debug(" Local port ............. : %hu", fd_g_config->cnf_port); 96 fd_log_debug(" Local secure port ...... : %hu", fd_g_config->cnf_port_tls); 97 fd_log_debug(" Number of SCTP streams . : %hu", fd_g_config->cnf_sctp_str); 98 fd_log_debug(" Number of server threads : %hu", fd_g_config->cnf_dispthr); 99 99 if (FD_IS_LIST_EMPTY(&fd_g_config->cnf_endpoints)) { 100 fd_log_debug(" Local endpoints ........ : Default (use all available) \n");100 fd_log_debug(" Local endpoints ........ : Default (use all available)"); 101 101 } else { 102 fd_log_debug(" Local endpoints ........ : \n");102 fd_log_debug(" Local endpoints ........ : "); 103 103 fd_ep_dump( 29, &fd_g_config->cnf_endpoints ); 104 104 } 105 105 if (FD_IS_LIST_EMPTY(&fd_g_config->cnf_apps)) { 106 fd_log_debug(" Local applications ..... : (none) \n");106 fd_log_debug(" Local applications ..... : (none)"); 107 107 } else { 108 108 struct fd_list * li = fd_g_config->cnf_apps.next; … … 111 111 struct fd_app * app = (struct fd_app *)li; 112 112 if (li != fd_g_config->cnf_apps.next) fd_log_debug(" "); 113 fd_log_debug("App: %u\t%s%s\tVnd: %u \n",113 fd_log_debug("App: %u\t%s%s\tVnd: %u", 114 114 app->appid, 115 115 app->flags.auth ? "Au" : "--", … … 120 120 } 121 121 122 fd_log_debug(" Flags : - IP ........... : %s \n", fd_g_config->cnf_flags.no_ip4 ? "DISABLED" : "Enabled");123 fd_log_debug(" - IPv6 ......... : %s \n", fd_g_config->cnf_flags.no_ip6 ? "DISABLED" : "Enabled");124 fd_log_debug(" - Relay app .... : %s \n", fd_g_config->cnf_flags.no_fwd ? "DISABLED" : "Enabled");125 fd_log_debug(" - TCP .......... : %s \n", fd_g_config->cnf_flags.no_tcp ? "DISABLED" : "Enabled");122 fd_log_debug(" Flags : - IP ........... : %s", fd_g_config->cnf_flags.no_ip4 ? "DISABLED" : "Enabled"); 123 fd_log_debug(" - IPv6 ......... : %s", fd_g_config->cnf_flags.no_ip6 ? "DISABLED" : "Enabled"); 124 fd_log_debug(" - Relay app .... : %s", fd_g_config->cnf_flags.no_fwd ? "DISABLED" : "Enabled"); 125 fd_log_debug(" - TCP .......... : %s", fd_g_config->cnf_flags.no_tcp ? "DISABLED" : "Enabled"); 126 126 #ifdef DISABLE_SCTP 127 fd_log_debug(" - SCTP ......... : DISABLED (at compilation) \n");127 fd_log_debug(" - SCTP ......... : DISABLED (at compilation)"); 128 128 #else /* DISABLE_SCTP */ 129 fd_log_debug(" - SCTP ......... : %s \n", fd_g_config->cnf_flags.no_sctp ? "DISABLED" : "Enabled");129 fd_log_debug(" - SCTP ......... : %s", fd_g_config->cnf_flags.no_sctp ? "DISABLED" : "Enabled"); 130 130 #endif /* DISABLE_SCTP */ 131 fd_log_debug(" - Pref. proto .. : %s \n", fd_g_config->cnf_flags.pr_tcp ? "TCP" : "SCTP");132 fd_log_debug(" - TLS method ... : %s \n", fd_g_config->cnf_flags.tls_alg ? "INBAND" : "Separate port");133 134 fd_log_debug(" TLS : - Certificate .. : %s \n", fd_g_config->cnf_sec_data.cert_file ?: "(NONE)");135 fd_log_debug(" - Private key .. : %s \n", fd_g_config->cnf_sec_data.key_file ?: "(NONE)");136 fd_log_debug(" - CA (trust) ... : %s (%d certs) \n", fd_g_config->cnf_sec_data.ca_file ?: "(none)", fd_g_config->cnf_sec_data.ca_file_nr);137 fd_log_debug(" - CRL .......... : %s \n", fd_g_config->cnf_sec_data.crl_file ?: "(none)");138 fd_log_debug(" - Priority ..... : %s \n", fd_g_config->cnf_sec_data.prio_string ?: "(default: '" GNUTLS_DEFAULT_PRIORITY "')");131 fd_log_debug(" - Pref. proto .. : %s", fd_g_config->cnf_flags.pr_tcp ? "TCP" : "SCTP"); 132 fd_log_debug(" - TLS method ... : %s", fd_g_config->cnf_flags.tls_alg ? "INBAND" : "Separate port"); 133 134 fd_log_debug(" TLS : - Certificate .. : %s", fd_g_config->cnf_sec_data.cert_file ?: "(NONE)"); 135 fd_log_debug(" - Private key .. : %s", fd_g_config->cnf_sec_data.key_file ?: "(NONE)"); 136 fd_log_debug(" - CA (trust) ... : %s (%d certs)", fd_g_config->cnf_sec_data.ca_file ?: "(none)", fd_g_config->cnf_sec_data.ca_file_nr); 137 fd_log_debug(" - CRL .......... : %s", fd_g_config->cnf_sec_data.crl_file ?: "(none)"); 138 fd_log_debug(" - Priority ..... : %s", fd_g_config->cnf_sec_data.prio_string ?: "(default: '" GNUTLS_DEFAULT_PRIORITY "')"); 139 139 if (fd_g_config->cnf_sec_data.dh_file) 140 fd_log_debug(" - DH file ...... : %s \n", fd_g_config->cnf_sec_data.dh_file);140 fd_log_debug(" - DH file ...... : %s", fd_g_config->cnf_sec_data.dh_file); 141 141 else 142 fd_log_debug(" - DH bits ...... : %d \n", fd_g_config->cnf_sec_data.dh_bits ?: GNUTLS_DEFAULT_DHBITS);143 144 fd_log_debug(" Origin-State-Id ........ : %u \n", fd_g_config->cnf_orstateid);142 fd_log_debug(" - DH bits ...... : %d", fd_g_config->cnf_sec_data.dh_bits ?: GNUTLS_DEFAULT_DHBITS); 143 144 fd_log_debug(" Origin-State-Id ........ : %u", fd_g_config->cnf_orstateid); 145 145 } 146 146 … … 172 172 if (ferror(pemfile)) { 173 173 int err = errno; 174 TRACE_DEBUG(INFO, "An error occurred while reading file: %s \n", strerror(err));174 TRACE_DEBUG(INFO, "An error occurred while reading file: %s", strerror(err)); 175 175 return err; 176 176 } … … 201 201 gnutls_x509_crt_get_dn (cert, name, &name_size); 202 202 203 fd_log_debug("\tSubject: %s \n", name);204 fd_log_debug("\tIssuer: %s \n", issuer_name);203 fd_log_debug("\tSubject: %s", name); 204 fd_log_debug("\tIssuer: %s", issuer_name); 205 205 206 206 if (issuer != NULL) … … 209 209 gnutls_x509_crt_get_dn (issuer, issuer_name, &issuer_name_size); 210 210 211 fd_log_debug("\tVerified against: %s \n", issuer_name);211 fd_log_debug("\tVerified against: %s", issuer_name); 212 212 } 213 213 … … 217 217 gnutls_x509_crl_get_issuer_dn (crl, issuer_name, &issuer_name_size); 218 218 219 fd_log_debug("\tVerified against CRL of: %s \n", issuer_name);219 fd_log_debug("\tVerified against CRL of: %s", issuer_name); 220 220 } 221 221 222 fd_log_debug("\tVerification output: %x \n\n", verification_output);222 fd_log_debug("\tVerification output: %x", verification_output); 223 223 224 224 return 0; … … 248 248 if (fddin == NULL) { 249 249 int ret = errno; 250 TRACE_ERROR("Unable to open configuration file for reading; tried the following locations: %s%s%s; Error: %s \n",250 TRACE_ERROR("Unable to open configuration file for reading; tried the following locations: %s%s%s; Error: %s", 251 251 orig ?: "", orig? " and " : "", fd_g_config->cnf_file, strerror(ret)); 252 252 return ret; … … 349 349 char buf[1024]; 350 350 sSA_DUMP_NODE( buf, sizeof(buf), &ep->sa, NI_NUMERICHOST ); 351 fd_log_debug("Info: Removing local address conflicting with the flags no_IP / no_IP6 : %s \n", buf);351 fd_log_debug("Info: Removing local address conflicting with the flags no_IP / no_IP6 : %s", buf); 352 352 } 353 353 free(ep); … … 380 380 if (!stream) { 381 381 int err = errno; 382 TRACE_DEBUG(INFO, "An error occurred while opening '%s': %s \n", fd_g_config->cnf_sec_data.cert_file, strerror(err));382 TRACE_DEBUG(INFO, "An error occurred while opening '%s': %s", fd_g_config->cnf_sec_data.cert_file, strerror(err)); 383 383 return err; 384 384 } … … 441 441 if (output & GNUTLS_CERT_INVALID) 442 442 { 443 fd_log_debug("TLS: Local certificate chain '%s' is invalid : \n", fd_g_config->cnf_sec_data.cert_file);443 fd_log_debug("TLS: Local certificate chain '%s' is invalid :", fd_g_config->cnf_sec_data.cert_file); 444 444 if (output & GNUTLS_CERT_SIGNER_NOT_FOUND) 445 fd_log_debug(" - The certificate hasn't got a known issuer. \n");445 fd_log_debug(" - The certificate hasn't got a known issuer."); 446 446 if (output & GNUTLS_CERT_SIGNER_NOT_CA) 447 fd_log_debug(" - The certificate signer is not a CA, or uses version 1, or 3 without basic constraints. \n");447 fd_log_debug(" - The certificate signer is not a CA, or uses version 1, or 3 without basic constraints."); 448 448 if (output & GNUTLS_CERT_NOT_ACTIVATED) 449 fd_log_debug(" - The certificate is not yet activated. \n");449 fd_log_debug(" - The certificate is not yet activated."); 450 450 if (output & GNUTLS_CERT_EXPIRED) 451 fd_log_debug(" - The certificate is expired. \n");451 fd_log_debug(" - The certificate is expired."); 452 452 return EINVAL; 453 453 } … … 456 456 if (!gnutls_x509_crt_check_hostname (certs[0], fd_g_config->cnf_diamid)) 457 457 { 458 fd_log_debug("TLS: The certificate owner does not match the hostname '%s' \n", fd_g_config->cnf_diamid);458 fd_log_debug("TLS: The certificate owner does not match the hostname '%s'", fd_g_config->cnf_diamid); 459 459 return EINVAL; 460 460 } … … 484 484 485 485 if (verify) { 486 fd_log_debug("TLS: Local certificate chain '%s' is invalid : \n", fd_g_config->cnf_sec_data.cert_file);486 fd_log_debug("TLS: Local certificate chain '%s' is invalid :", fd_g_config->cnf_sec_data.cert_file); 487 487 if (verify & GNUTLS_CERT_INVALID) 488 fd_log_debug(" - The certificate is not trusted (unknown CA? expired?) \n");488 fd_log_debug(" - The certificate is not trusted (unknown CA? expired?)"); 489 489 if (verify & GNUTLS_CERT_REVOKED) 490 fd_log_debug(" - The certificate has been revoked. \n");490 fd_log_debug(" - The certificate has been revoked."); 491 491 if (verify & GNUTLS_CERT_SIGNER_NOT_FOUND) 492 fd_log_debug(" - The certificate hasn't got a known issuer. \n");492 fd_log_debug(" - The certificate hasn't got a known issuer."); 493 493 if (verify & GNUTLS_CERT_SIGNER_NOT_CA) 494 fd_log_debug(" - The certificate signer is not a CA, or uses version 1, or 3 without basic constraints. \n");494 fd_log_debug(" - The certificate signer is not a CA, or uses version 1, or 3 without basic constraints."); 495 495 if (verify & GNUTLS_CERT_INSECURE_ALGORITHM) 496 fd_log_debug(" - The certificate signature uses a weak algorithm. \n");496 fd_log_debug(" - The certificate signature uses a weak algorithm."); 497 497 return EINVAL; 498 498 } … … 500 500 /* Check the local Identity is valid with the certificate */ 501 501 if (!gnutls_x509_crt_check_hostname (certs[0], fd_g_config->cnf_diamid)) { 502 fd_log_debug("TLS: Local certificate '%s' is invalid : \n", fd_g_config->cnf_sec_data.cert_file);503 fd_log_debug(" - The certificate hostname does not match '%s' \n", fd_g_config->cnf_diamid);502 fd_log_debug("TLS: Local certificate '%s' is invalid :", fd_g_config->cnf_sec_data.cert_file); 503 fd_log_debug(" - The certificate hostname does not match '%s'", fd_g_config->cnf_diamid); 504 504 return EINVAL; 505 505 } … … 513 513 GNUTLS_TRACE( deadline = gnutls_x509_crt_get_expiration_time(certs[i]) ); 514 514 if ((deadline != (time_t)-1) && (deadline < now)) { 515 fd_log_debug("TLS: Local certificate chain '%s' is invalid : \n", fd_g_config->cnf_sec_data.cert_file);516 fd_log_debug(" - The certificate %d in the chain is expired \n", i);515 fd_log_debug("TLS: Local certificate chain '%s' is invalid :", fd_g_config->cnf_sec_data.cert_file); 516 fd_log_debug(" - The certificate %d in the chain is expired", i); 517 517 return EINVAL; 518 518 } … … 520 520 GNUTLS_TRACE( deadline = gnutls_x509_crt_get_activation_time(certs[i]) ); 521 521 if ((deadline != (time_t)-1) && (deadline > now)) { 522 fd_log_debug("TLS: Local certificate chain '%s' is invalid : \n", fd_g_config->cnf_sec_data.cert_file);523 fd_log_debug(" - The certificate %d in the chain is not yet activated \n", i);522 fd_log_debug("TLS: Local certificate chain '%s' is invalid :", fd_g_config->cnf_sec_data.cert_file); 523 fd_log_debug(" - The certificate %d in the chain is not yet activated", i); 524 524 return EINVAL; 525 525 } … … 551 551 if (!stream) { 552 552 int err = errno; 553 TRACE_DEBUG(INFO, "An error occurred while opening '%s': %s \n", fd_g_config->cnf_sec_data.dh_file, strerror(err));553 TRACE_DEBUG(INFO, "An error occurred while opening '%s': %s", fd_g_config->cnf_sec_data.dh_file, strerror(err)); 554 554 return err; 555 555 } … … 573 573 if (ferror(stream)) { 574 574 int err = errno; 575 TRACE_DEBUG(INFO, "An error occurred while reading '%s': %s \n", fd_g_config->cnf_sec_data.dh_file, strerror(err));575 TRACE_DEBUG(INFO, "An error occurred while reading '%s': %s", fd_g_config->cnf_sec_data.dh_file, strerror(err)); 576 576 return err; 577 577 } -
libfdcore/core.c
r961 r974 131 131 132 132 default: 133 TRACE_DEBUG(INFO, "Unexpected event in the main event queue (%d), ignored. \n", code);133 TRACE_DEBUG(INFO, "Unexpected event in the main event queue (%d), ignored.", code); 134 134 } 135 135 } … … 154 154 CHECK_FCT_DO( fd_event_trig_fini(), ); 155 155 156 fd_log_debug(FD_PROJECT_BINARY " framework is terminated. \n");156 fd_log_debug(FD_PROJECT_BINARY " framework is terminated."); 157 157 158 158 fd_libproto_fini(); -
libfdcore/endpoints.c
r946 r974 64 64 fd_ep_dump( 4, list ); 65 65 TRACE_DEBUG(ANNOYING, " DEBUG:fd_ep_add_merge Adding:"); 66 fd_log_debug(" %s {%s%s%s%s} \n", buf,66 fd_log_debug(" %s {%s%s%s%s}", buf, 67 67 (flags & EP_FL_CONF) ? "C" : "-", 68 68 (flags & EP_FL_DISC) ? "D" : "-", -
libfdcore/events.c
r740 r974 178 178 for (li = trig_list.next; li != &trig_list; li = li->next) { 179 179 struct trig_item *t = li->o; 180 fd_log_debug(" Trigger %d, module '%s': %p \n", t->trig_value, t->trig_module, t->cb);180 fd_log_debug(" Trigger %d, module '%s': %p", t->trig_value, t->trig_module, t->cb); 181 181 } 182 182 -
libfdcore/extensions.c
r837 r974 82 82 struct fd_list * li; 83 83 84 fd_log_debug("Dumping extensions list : \n");84 fd_log_debug("Dumping extensions list :"); 85 85 86 86 for (li = ext_list.next; li != &ext_list; li = li->next) 87 87 { 88 88 struct fd_ext_info * ext = (struct fd_ext_info *)li; 89 fd_log_debug(" - '%s'[%s] is %sloaded \n", ext->filename, ext->conffile?:"no conf", ext->handler ? "" : "not ");89 fd_log_debug(" - '%s'[%s] is %sloaded", ext->filename, ext->conffile?:"no conf", ext->handler ? "" : "not "); 90 90 } 91 91 } … … 126 126 if (li == &ext->chain) { 127 127 /* the dependency was not found */ 128 TRACE_DEBUG(NONE, "Error: extension [%s] depends on [%s] which was not loaded first. \nPlease fix your configuration file.",128 TRACE_DEBUG(NONE, "Error: extension [%s] depends on [%s] which was not loaded first. Please fix your configuration file.", 129 129 ext->ext_name, ext->depends[i]); 130 130 return ESRCH; … … 162 162 if (ext->handler == NULL) { 163 163 /* An error occured */ 164 TRACE_DEBUG( NONE, "Loading of extension %s failed: \n%s", ext->filename, dlerror());164 TRACE_DEBUG( NONE, "Loading of extension %s failed: %s", ext->filename, dlerror()); 165 165 #ifdef DEBUG 166 166 ext->handler = dlopen(ext->filename, RTLD_LAZY | RTLD_GLOBAL); 167 167 if (ext->handler) { 168 168 if (!check_dependencies(ext)) { 169 TRACE_DEBUG( NONE, "In addition, all declared dependencies are satisfied (Internal Error!) \n");169 TRACE_DEBUG( NONE, "In addition, all declared dependencies are satisfied (Internal Error!)"); 170 170 } 171 171 } … … 182 182 if (fd_ext_init == NULL) { 183 183 /* An error occured */ 184 TRACE_DEBUG( NONE, "Unable to resolve symbol 'fd_ext_init' for extension %s: \n %s\n", ext->filename, dlerror());184 TRACE_DEBUG( NONE, "Unable to resolve symbol 'fd_ext_init' for extension %s: %s", ext->filename, dlerror()); 185 185 return EINVAL; 186 186 } … … 201 201 if (ret != 0) { 202 202 /* The extension was unable to load cleanly */ 203 TRACE_DEBUG( NONE, "Extension %s returned an error during initialization: %s \n", ext->filename, strerror(ret));203 TRACE_DEBUG( NONE, "Extension %s returned an error during initialization: %s", ext->filename, strerror(ret)); 204 204 return ret; 205 205 } … … 239 239 TRACE_DEBUG (FULL, "Unloading %s", ext->ext_name ?: ext->filename); 240 240 if ( dlclose(ext->handler) != 0 ) { 241 TRACE_DEBUG (INFO, "Unloading [%s] failed : %s \n", ext->ext_name ?: ext->filename, dlerror());241 TRACE_DEBUG (INFO, "Unloading [%s] failed : %s", ext->ext_name ?: ext->filename, dlerror()); 242 242 } 243 243 } -
libfdcore/fdd.l
r969 r974 84 84 int globerrfct(const char *epath, int eerrno) 85 85 { 86 TRACE_ERROR("Failed to scan %s: %s \n", epath, strerror(eerrno));86 TRACE_ERROR("Failed to scan %s: %s", epath, strerror(eerrno)); 87 87 return 1; 88 88 } … … 119 119 if (buf[yyleng-2] != '"') 120 120 { 121 TRACE_ERROR("Unterminated string: %s \n", yytext);121 TRACE_ERROR("Unterminated string: %s", yytext); 122 122 return LEX_ERROR; 123 123 } … … 126 126 if (current_nested_level >= MAX_NESTED_CONF_FILES) 127 127 { 128 TRACE_ERROR("Too many recursion levels in configuration files includes \n");128 TRACE_ERROR("Too many recursion levels in configuration files includes"); 129 129 return LEX_ERROR; 130 130 } … … 135 135 if (globerror == GLOB_NOSPACE) 136 136 { 137 TRACE_ERROR("Not enough memory to parse include directive. \n");137 TRACE_ERROR("Not enough memory to parse include directive."); 138 138 return LEX_ERROR; 139 139 } 140 140 if (globerror == GLOB_ABORTED) 141 141 { 142 TRACE_ERROR("An error was encountered in include directive. \n");142 TRACE_ERROR("An error was encountered in include directive."); 143 143 return LEX_ERROR; 144 144 } … … 150 150 if (globerror) 151 151 { 152 TRACE_ERROR("Unexpected error in glob (%d). \n", globerror);152 TRACE_ERROR("Unexpected error in glob (%d).", globerror); 153 153 return LEX_ERROR; 154 154 } … … 234 234 if (ret != 1) { 235 235 /* No matching: an error occurred */ 236 TRACE_ERROR("Unable to convert the value '%s' to a valid number: %s \n", yytext, strerror(errno));236 TRACE_ERROR("Unable to convert the value '%s' to a valid number: %s", yytext, strerror(errno)); 237 237 return LEX_ERROR; /* trig an error in yacc parser */ 238 238 /* Maybe we could REJECT instead of failing here? */ … … 277 277 /* Unrecognized character */ 278 278 <*>. { 279 TRACE_ERROR("Unrecognized text on line %d col %d: '%s'. \n", yylloc->first_line, yylloc->first_column, yytext);279 TRACE_ERROR("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext); 280 280 return LEX_ERROR; 281 281 } -
libfdcore/fdd.y
r969 r974 63 63 { 64 64 if (ploc->first_line != ploc->last_line) { 65 TRACE_ERROR("%s:%d.%d-%d.%d : %s \n", conf->cnf_file, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);65 TRACE_ERROR("%s:%d.%d-%d.%d : %s", conf->cnf_file, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s); 66 66 } else if (ploc->first_column != ploc->last_column) { 67 TRACE_ERROR("%s:%d.%d-%d : %s \n", conf->cnf_file, ploc->first_line, ploc->first_column, ploc->last_column, s);67 TRACE_ERROR("%s:%d.%d-%d : %s", conf->cnf_file, ploc->first_line, ploc->first_column, ploc->last_column, s); 68 68 } else { 69 TRACE_ERROR("%s:%d.%d : %s \n", conf->cnf_file, ploc->first_line, ploc->first_column, s);69 TRACE_ERROR("%s:%d.%d : %s", conf->cnf_file, ploc->first_line, ploc->first_column, s); 70 70 } 71 71 } … … 504 504 if (fd == NULL) { 505 505 int ret = errno; 506 TRACE_ERROR("Unable to open certificate file %s for reading: %s \n", $3, strerror(ret));506 TRACE_ERROR("Unable to open certificate file %s for reading: %s", $3, strerror(ret)); 507 507 yyerror (&yylloc, conf, "Error on file name"); 508 508 YYERROR; … … 512 512 if (fd == NULL) { 513 513 int ret = errno; 514 TRACE_ERROR("Unable to open private key file %s for reading: %s \n", $5, strerror(ret));514 TRACE_ERROR("Unable to open private key file %s for reading: %s", $5, strerror(ret)); 515 515 yyerror (&yylloc, conf, "Error on file name"); 516 516 YYERROR; … … 535 535 if (fd == NULL) { 536 536 int ret = errno; 537 TRACE_ERROR("Unable to open CA file %s for reading: %s \n", $3, strerror(ret));537 TRACE_ERROR("Unable to open CA file %s for reading: %s", $3, strerror(ret)); 538 538 yyerror (&yylloc, conf, "Error on file name"); 539 539 YYERROR; … … 575 575 if (fd == NULL) { 576 576 int ret = errno; 577 TRACE_ERROR("Unable to open CRL file %s for reading: %s \n", $3, strerror(ret));577 TRACE_ERROR("Unable to open CRL file %s for reading: %s", $3, strerror(ret)); 578 578 yyerror (&yylloc, conf, "Error on file name"); 579 579 YYERROR; … … 618 618 &err_pos), 619 619 { yyerror (&yylloc, conf, "Error setting Priority parameter."); 620 TRACE_ERROR("Error at position : %s \n", err_pos);620 TRACE_ERROR("Error at position : %s", err_pos); 621 621 YYERROR; } ); 622 622 } … … 635 635 if (fd == NULL) { 636 636 int ret = errno; 637 TRACE_ERROR("Unable to open DH file %s for reading: %s \n", $3, strerror(ret));637 TRACE_ERROR("Unable to open DH file %s for reading: %s", $3, strerror(ret)); 638 638 yyerror (&yylloc, conf, "Error on file name"); 639 639 YYERROR; -
libfdcore/p_ce.c
r935 r974 306 306 if (fd_os_almostcasesrch(hdr->avp_value->os.data, hdr->avp_value->os.len, 307 307 peer->p_hdr.info.pi_diamid, peer->p_hdr.info.pi_diamidlen, NULL)) { 308 TRACE_DEBUG(INFO, "Received a message with Origin-Host set to '%.*s' while expecting '%s' \n",308 TRACE_DEBUG(INFO, "Received a message with Origin-Host set to '%.*s' while expecting '%s'", 309 309 hdr->avp_value->os.len, hdr->avp_value->os.data, peer->p_hdr.info.pi_diamid); 310 310 error->pei_errcode = "DIAMETER_AVP_NOT_ALLOWED"; … … 778 778 { 779 779 /* Handshake failed ... */ 780 fd_log_debug("TLS Handshake failed with peer '%s', resetting the connection \n", peer->p_hdr.info.pi_diamid);780 fd_log_debug("TLS Handshake failed with peer '%s', resetting the connection", peer->p_hdr.info.pi_diamid); 781 781 goto cleanup; 782 782 } ); … … 831 831 size_t len = strlen(peer->p_hdr.info.config.pic_realm); 832 832 if (fd_os_almostcasesrch(peer->p_hdr.info.config.pic_realm, len, peer->p_hdr.info.runtime.pir_realm, peer->p_hdr.info.runtime.pir_realmlen, NULL)) { 833 TRACE_DEBUG(INFO, "Rejected CER from peer '%s', realm mismatch with configured value (returning DIAMETER_UNKNOWN_PEER). \n", peer->p_hdr.info.pi_diamid);833 TRACE_DEBUG(INFO, "Rejected CER from peer '%s', realm mismatch with configured value (returning DIAMETER_UNKNOWN_PEER).", peer->p_hdr.info.pi_diamid); 834 834 pei.pei_errcode = "DIAMETER_UNKNOWN_PEER"; /* maybe AVP_NOT_ALLOWED would be better fit? */ 835 835 goto error_abort; … … 846 846 int res = fd_peer_validate( peer ); 847 847 if (res < 0) { 848 TRACE_DEBUG(INFO, "Rejected CER from peer '%s', validation failed (returning DIAMETER_UNKNOWN_PEER). \n", peer->p_hdr.info.pi_diamid);848 TRACE_DEBUG(INFO, "Rejected CER from peer '%s', validation failed (returning DIAMETER_UNKNOWN_PEER).", peer->p_hdr.info.pi_diamid); 849 849 pei.pei_errcode = "DIAMETER_UNKNOWN_PEER"; 850 850 goto error_abort; … … 931 931 { 932 932 /* Handshake failed ... */ 933 fd_log_debug("TLS Handshake failed with peer '%s', resetting the connection \n", peer->p_hdr.info.pi_diamid);933 fd_log_debug("TLS Handshake failed with peer '%s', resetting the connection", peer->p_hdr.info.pi_diamid); 934 934 goto cleanup; 935 935 } ); -
libfdcore/p_cnx.c
r931 r974 90 90 ret = getaddrinfo(peer->p_hdr.info.pi_diamid, NULL, &hints, &ai); 91 91 if (ret) { 92 TRACE_DEBUG(INFO, "Unable to resolve address for peer '%s' (%s), aborting \n", peer->p_hdr.info.pi_diamid, gai_strerror(ret));92 TRACE_DEBUG(INFO, "Unable to resolve address for peer '%s' (%s), aborting", peer->p_hdr.info.pi_diamid, gai_strerror(ret)); 93 93 if (ret != EAI_AGAIN) 94 94 fd_psm_terminate( peer, NULL ); … … 126 126 /* Now check we have at least one address to attempt */ 127 127 if (FD_IS_LIST_EMPTY(&peer->p_hdr.info.pi_endpoints)) { 128 TRACE_DEBUG(INFO, "No address %savailable to connect to peer '%s', aborting \n",128 TRACE_DEBUG(INFO, "No address %savailable to connect to peer '%s', aborting", 129 129 peer->p_hdr.info.config.pic_flags.pro3 ? "in the configured family " : "", peer->p_hdr.info.pi_diamid); 130 130 fd_psm_terminate( peer, NULL ); … … 279 279 { 280 280 /* Handshake failed ... */ 281 TRACE_DEBUG(INFO, "TLS Handshake failed with peer '%s', resetting the connection \n", peer->p_hdr.info.pi_diamid);281 TRACE_DEBUG(INFO, "TLS Handshake failed with peer '%s', resetting the connection", peer->p_hdr.info.pi_diamid); 282 282 fd_cnx_destroy(cnx); 283 283 empty_connection_list(peer); -
libfdcore/p_dp.c
r740 r974 97 97 if (dictobj) { 98 98 CHECK_FCT( fd_dict_getval( dictobj, &er.search ) ); 99 TRACE_DEBUG(INFO, "Peer '%s' sent a DPR with cause: %s \n", peer->p_hdr.info.pi_diamid, er.search.enum_name);99 TRACE_DEBUG(INFO, "Peer '%s' sent a DPR with cause: %s", peer->p_hdr.info.pi_diamid, er.search.enum_name); 100 100 } else { 101 TRACE_DEBUG(INFO, "Peer '%s' sent a DPR with unknown cause: %u \n", peer->p_hdr.info.pi_diamid, peer->p_hdr.info.runtime.pir_lastDC);101 TRACE_DEBUG(INFO, "Peer '%s' sent a DPR with unknown cause: %u", peer->p_hdr.info.pi_diamid, peer->p_hdr.info.runtime.pir_lastDC); 102 102 } 103 103 } else { 104 TRACE_DEBUG(INFO, "Peer '%s' sent a DPR without Disconnect-Cause AVP \n", peer->p_hdr.info.pi_diamid);104 TRACE_DEBUG(INFO, "Peer '%s' sent a DPR without Disconnect-Cause AVP", peer->p_hdr.info.pi_diamid); 105 105 } 106 106 } -
libfdcore/p_dw.c
r745 r974 62 62 63 63 if (peer->p_hdr.info.runtime.pir_orstate != hdr->avp_value->u32) { 64 TRACE_DEBUG(INFO, "Received a new Origin-State-Id from peer '%s'! (%x -> %x); resetting the connection. \n",64 TRACE_DEBUG(INFO, "Received a new Origin-State-Id from peer '%s'! (%x -> %x); resetting the connection.", 65 65 peer->p_hdr.info.pi_diamid, 66 66 peer->p_hdr.info.runtime.pir_orstate, -
libfdcore/p_psm.c
r972 r974 486 486 CHECK_FCT_DO( fd_msg_parse_buffer( (void *)&ev_data, ev_sz, &msg), 487 487 { 488 fd_log_debug("Received invalid data from peer '%s', closing the connection \n", peer->p_hdr.info.pi_diamid);488 fd_log_debug("Received invalid data from peer '%s', closing the connection", peer->p_hdr.info.pi_diamid); 489 489 free(ev_data); 490 490 CHECK_FCT_DO( fd_event_send(peer->p_events, FDEVP_CNX_ERROR, 0, NULL), goto psm_reset ); -
libfdcore/p_sr.c
r938 r974 69 69 return; 70 70 71 fd_log_debug("%sSentReq list @%p: \n", text, srlist);71 fd_log_debug("%sSentReq list @%p:", text, srlist); 72 72 73 73 CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &now), ); … … 77 77 uint32_t * nexthbh = li->o; 78 78 79 fd_log_debug(" - Next req (hbh:%x): [since %ld.%06ld sec] \n", *nexthbh,79 fd_log_debug(" - Next req (hbh:%x): [since %ld.%06ld sec]", *nexthbh, 80 80 (now.tv_nsec >= sr->added_on.tv_nsec) ? (now.tv_sec - sr->added_on.tv_sec) : (now.tv_sec - sr->added_on.tv_sec - 1), 81 81 (now.tv_nsec >= sr->added_on.tv_nsec) ? (now.tv_nsec - sr->added_on.tv_nsec) / 1000 : (now.tv_nsec - sr->added_on.tv_nsec + 1000000000) / 1000); -
libfdcore/peers.c
r972 r974 405 405 void fd_peer_dump(struct fd_peer * peer, int details) 406 406 { 407 char buf[1024]; 407 408 if (peer->p_eyec != EYEC_PEER) { 408 fd_log_debug(" Invalid peer @ %p ! \n", peer);409 fd_log_debug(" Invalid peer @ %p !", peer); 409 410 return; 410 411 } 411 412 412 fd_log_debug("> %s\t%s\t[%dsr]", STATE_STR(fd_peer_getstate(peer)), peer->p_hdr.info.pi_diamid, peer->p_sr.cnt);413 snprintf(buf, sizeof(buf), "> %s\t%s\t[%dsr]", STATE_STR(fd_peer_getstate(peer)), peer->p_hdr.info.pi_diamid, peer->p_sr.cnt); 413 414 if (details > INFO) { 414 fd_log_debug("\t(rlm:%s)", peer->p_hdr.info.runtime.pir_realm ?: "<unknown>");415 snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), "\t(rlm:%s)", peer->p_hdr.info.runtime.pir_realm ?: "<unknown>"); 415 416 if (peer->p_hdr.info.runtime.pir_prodname) 416 fd_log_debug("\t['%s' %u]", peer->p_hdr.info.runtime.pir_prodname, peer->p_hdr.info.runtime.pir_firmrev);417 } 418 fd_log_debug( "\n");417 snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), "\t['%s' %u]", peer->p_hdr.info.runtime.pir_prodname, peer->p_hdr.info.runtime.pir_firmrev); 418 } 419 fd_log_debug(buf); 419 420 if (details > FULL) { 420 421 /* Dump all info */ 421 fd_log_debug("\tEntry origin : %s \n", peer->p_dbgorig?: "not set");422 fd_log_debug("\tConfig flags : %s%s%s%s%s - %s%s%s \n",422 fd_log_debug("\tEntry origin : %s", peer->p_dbgorig?: "not set"); 423 fd_log_debug("\tConfig flags : %s%s%s%s%s - %s%s%s", 423 424 peer->p_hdr.info.config.pic_flags.pro3 == PI_P3_DEFAULT ? "" : 424 425 (peer->p_hdr.info.config.pic_flags.pro3 == PI_P3_IP ? "IP." : "IPv6."), … … 431 432 peer->p_hdr.info.config.pic_flags.persist ? "Persist." : "" 432 433 ); 433 fd_log_debug("\tLifetime : %d sec \n", peer->p_hdr.info.config.pic_lft);434 fd_log_debug("\tLifetime : %d sec", peer->p_hdr.info.config.pic_lft); 434 435 } 435 436 } … … 440 441 struct fd_list * li; 441 442 442 fd_log_debug("Dumping list of peers : \n");443 fd_log_debug("Dumping list of peers :"); 443 444 CHECK_FCT_DO( pthread_rwlock_rdlock(&fd_g_peers_rw), /* continue */ ); 444 445 -
libfdcore/routing_dispatch.c
r934 r974 565 565 /* Check if we have local support for the message application */ 566 566 if ( (hdr->msg_appl == 0) || (hdr->msg_appl == AI_RELAY) ) { 567 TRACE_DEBUG(INFO, "Received a routable message with application id 0 or " _stringize(AI_RELAY) " (relay), \n"567 TRACE_DEBUG(INFO, "Received a routable message with application id 0 or " _stringize(AI_RELAY) " (relay)," 568 568 " returning DIAMETER_APPLICATION_UNSUPPORTED"); 569 569 CHECK_FCT( return_error( &msgptr, "DIAMETER_APPLICATION_UNSUPPORTED", "Routable message with application id 0 or relay", NULL) ); -
libfdcore/sctp.c
r965 r974 88 88 return ENOTSUP; 89 89 } 90 fd_log_debug( "Def SCTP_RTOINFO : srto_initial : %u \n", rtoinfo.srto_initial);91 fd_log_debug( " srto_min : %u \n", rtoinfo.srto_min);92 fd_log_debug( " srto_max : %u \n", rtoinfo.srto_max);90 fd_log_debug( "Def SCTP_RTOINFO : srto_initial : %u", rtoinfo.srto_initial); 91 fd_log_debug( " srto_min : %u", rtoinfo.srto_min); 92 fd_log_debug( " srto_max : %u", rtoinfo.srto_max); 93 93 } 94 94 … … 103 103 /* Check new values */ 104 104 CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_RTOINFO, &rtoinfo, &sz) ); 105 fd_log_debug( "New SCTP_RTOINFO : srto_initial : %u \n", rtoinfo.srto_initial);106 fd_log_debug( " srto_max : %u \n", rtoinfo.srto_max);107 fd_log_debug( " srto_min : %u \n", rtoinfo.srto_min);105 fd_log_debug( "New SCTP_RTOINFO : srto_initial : %u", rtoinfo.srto_initial); 106 fd_log_debug( " srto_max : %u", rtoinfo.srto_max); 107 fd_log_debug( " srto_min : %u", rtoinfo.srto_min); 108 108 } 109 109 } … … 127 127 return ENOTSUP; 128 128 } 129 fd_log_debug( "Def SCTP_ASSOCINFO : sasoc_asocmaxrxt : %hu \n", assoc.sasoc_asocmaxrxt);130 fd_log_debug( " sasoc_number_peer_destinations : %hu \n", assoc.sasoc_number_peer_destinations);131 fd_log_debug( " sasoc_peer_rwnd : %u \n" , assoc.sasoc_peer_rwnd);132 fd_log_debug( " sasoc_local_rwnd : %u \n" , assoc.sasoc_local_rwnd);133 fd_log_debug( " sasoc_cookie_life : %u \n" , assoc.sasoc_cookie_life);129 fd_log_debug( "Def SCTP_ASSOCINFO : sasoc_asocmaxrxt : %hu", assoc.sasoc_asocmaxrxt); 130 fd_log_debug( " sasoc_number_peer_destinations : %hu", assoc.sasoc_number_peer_destinations); 131 fd_log_debug( " sasoc_peer_rwnd : %u" , assoc.sasoc_peer_rwnd); 132 fd_log_debug( " sasoc_local_rwnd : %u" , assoc.sasoc_local_rwnd); 133 fd_log_debug( " sasoc_cookie_life : %u" , assoc.sasoc_cookie_life); 134 134 } 135 135 … … 143 143 /* Check new values */ 144 144 CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_ASSOCINFO, &assoc, &sz) ); 145 fd_log_debug( "New SCTP_ASSOCINFO : sasoc_asocmaxrxt : %hu \n", assoc.sasoc_asocmaxrxt);146 fd_log_debug( " sasoc_number_peer_destinations : %hu \n", assoc.sasoc_number_peer_destinations);147 fd_log_debug( " sasoc_peer_rwnd : %u \n" , assoc.sasoc_peer_rwnd);148 fd_log_debug( " sasoc_local_rwnd : %u \n" , assoc.sasoc_local_rwnd);149 fd_log_debug( " sasoc_cookie_life : %u \n" , assoc.sasoc_cookie_life);145 fd_log_debug( "New SCTP_ASSOCINFO : sasoc_asocmaxrxt : %hu", assoc.sasoc_asocmaxrxt); 146 fd_log_debug( " sasoc_number_peer_destinations : %hu", assoc.sasoc_number_peer_destinations); 147 fd_log_debug( " sasoc_peer_rwnd : %u" , assoc.sasoc_peer_rwnd); 148 fd_log_debug( " sasoc_local_rwnd : %u" , assoc.sasoc_local_rwnd); 149 fd_log_debug( " sasoc_cookie_life : %u" , assoc.sasoc_cookie_life); 150 150 } 151 151 } … … 171 171 return ENOTSUP; 172 172 } 173 fd_log_debug( "Def SCTP_INITMSG : sinit_num_ostreams : %hu \n", init.sinit_num_ostreams);174 fd_log_debug( " sinit_max_instreams : %hu \n", init.sinit_max_instreams);175 fd_log_debug( " sinit_max_attempts : %hu \n", init.sinit_max_attempts);176 fd_log_debug( " sinit_max_init_timeo : %hu \n", init.sinit_max_init_timeo);173 fd_log_debug( "Def SCTP_INITMSG : sinit_num_ostreams : %hu", init.sinit_num_ostreams); 174 fd_log_debug( " sinit_max_instreams : %hu", init.sinit_max_instreams); 175 fd_log_debug( " sinit_max_attempts : %hu", init.sinit_max_attempts); 176 fd_log_debug( " sinit_max_init_timeo : %hu", init.sinit_max_init_timeo); 177 177 } 178 178 … … 187 187 /* Check new values */ 188 188 CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_INITMSG, &init, &sz) ); 189 fd_log_debug( "New SCTP_INITMSG : sinit_num_ostreams : %hu \n", init.sinit_num_ostreams);190 fd_log_debug( " sinit_max_instreams : %hu \n", init.sinit_max_instreams);191 fd_log_debug( " sinit_max_attempts : %hu \n", init.sinit_max_attempts);192 fd_log_debug( " sinit_max_init_timeo : %hu \n", init.sinit_max_init_timeo);189 fd_log_debug( "New SCTP_INITMSG : sinit_num_ostreams : %hu", init.sinit_num_ostreams); 190 fd_log_debug( " sinit_max_instreams : %hu", init.sinit_max_instreams); 191 fd_log_debug( " sinit_max_attempts : %hu", init.sinit_max_attempts); 192 fd_log_debug( " sinit_max_init_timeo : %hu", init.sinit_max_init_timeo); 193 193 } 194 194 } … … 212 212 return ENOTSUP; 213 213 } 214 fd_log_debug( "Def SO_LINGER : l_onoff : %d \n", linger.l_onoff);215 fd_log_debug( " l_linger : %d \n", linger.l_linger);214 fd_log_debug( "Def SO_LINGER : l_onoff : %d", linger.l_onoff); 215 fd_log_debug( " l_linger : %d", linger.l_linger); 216 216 } 217 217 … … 225 225 /* Check new values */ 226 226 CHECK_SYS( getsockopt(sk, SOL_SOCKET, SO_LINGER, &linger, &sz) ); 227 fd_log_debug( "New SO_LINGER : l_onoff : %d \n", linger.l_onoff);228 fd_log_debug( " l_linger : %d \n", linger.l_linger);227 fd_log_debug( "New SO_LINGER : l_onoff : %d", linger.l_onoff); 228 fd_log_debug( " l_linger : %d", linger.l_linger); 229 229 } 230 230 } … … 247 247 return ENOTSUP; 248 248 } 249 fd_log_debug( "Def SCTP_NODELAY value : %s \n", nodelay ? "true" : "false");249 fd_log_debug( "Def SCTP_NODELAY value : %s", nodelay ? "true" : "false"); 250 250 } 251 251 … … 258 258 /* Check new values */ 259 259 CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_NODELAY, &nodelay, &sz) ); 260 fd_log_debug( "New SCTP_NODELAY value : %s \n", nodelay ? "true" : "false");260 fd_log_debug( "New SCTP_NODELAY value : %s", nodelay ? "true" : "false"); 261 261 } 262 262 } … … 287 287 return ENOTSUP; 288 288 } 289 fd_log_debug( "Def SCTP_DISABLE_FRAGMENTS value : %s \n", nofrag ? "true" : "false");289 fd_log_debug( "Def SCTP_DISABLE_FRAGMENTS value : %s", nofrag ? "true" : "false"); 290 290 } 291 291 … … 298 298 /* Check new values */ 299 299 CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_DISABLE_FRAGMENTS, &nofrag, &sz) ); 300 fd_log_debug( "New SCTP_DISABLE_FRAGMENTS value : %s \n", nofrag ? "true" : "false");300 fd_log_debug( "New SCTP_DISABLE_FRAGMENTS value : %s", nofrag ? "true" : "false"); 301 301 } 302 302 } … … 324 324 return ENOTSUP; 325 325 } 326 fd_log_debug( "Def SCTP_PEER_ADDR_PARAMS : spp_hbinterval : %u \n", parms.spp_hbinterval);327 fd_log_debug( " spp_pathmaxrxt : %hu \n", parms.spp_pathmaxrxt);328 fd_log_debug( " spp_pathmtu : %u \n", parms.spp_pathmtu);329 fd_log_debug( " spp_flags : %x \n", parms.spp_flags);330 // fd_log_debug( " spp_ipv6_flowlabel: %u \n", parms.spp_ipv6_flowlabel);331 // fd_log_debug( " spp_ipv4_tos : %hhu \n",parms.spp_ipv4_tos);326 fd_log_debug( "Def SCTP_PEER_ADDR_PARAMS : spp_hbinterval : %u", parms.spp_hbinterval); 327 fd_log_debug( " spp_pathmaxrxt : %hu", parms.spp_pathmaxrxt); 328 fd_log_debug( " spp_pathmtu : %u", parms.spp_pathmtu); 329 fd_log_debug( " spp_flags : %x", parms.spp_flags); 330 // fd_log_debug( " spp_ipv6_flowlabel: %u", parms.spp_ipv6_flowlabel); 331 // fd_log_debug( " spp_ipv4_tos : %hhu",parms.spp_ipv4_tos); 332 332 } 333 333 … … 348 348 /* Check new values */ 349 349 CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_PEER_ADDR_PARAMS, &parms, &sz) ); 350 fd_log_debug( "New SCTP_PEER_ADDR_PARAMS : spp_hbinterval : %u \n", parms.spp_hbinterval);351 fd_log_debug( " spp_pathmaxrxt : %hu \n", parms.spp_pathmaxrxt);352 fd_log_debug( " spp_pathmtu : %u \n", parms.spp_pathmtu);353 fd_log_debug( " spp_flags : %x \n", parms.spp_flags);354 // fd_log_debug( " spp_ipv6_flowlabel: %u \n", parms.spp_ipv6_flowlabel);355 // fd_log_debug( " spp_ipv4_tos : %hhu \n",parms.spp_ipv4_tos);350 fd_log_debug( "New SCTP_PEER_ADDR_PARAMS : spp_hbinterval : %u", parms.spp_hbinterval); 351 fd_log_debug( " spp_pathmaxrxt : %hu", parms.spp_pathmaxrxt); 352 fd_log_debug( " spp_pathmtu : %u", parms.spp_pathmtu); 353 fd_log_debug( " spp_flags : %x", parms.spp_flags); 354 // fd_log_debug( " spp_ipv6_flowlabel: %u", parms.spp_ipv6_flowlabel); 355 // fd_log_debug( " spp_ipv4_tos : %hhu",parms.spp_ipv4_tos); 356 356 } 357 357 } … … 392 392 } 393 393 394 fd_log_debug( "SCTP_EVENTS : sctp_data_io_event : %hhu \n", event.sctp_data_io_event);395 fd_log_debug( " sctp_association_event : %hhu \n", event.sctp_association_event);396 fd_log_debug( " sctp_address_event : %hhu \n", event.sctp_address_event);397 fd_log_debug( " sctp_send_failure_event : %hhu \n", event.sctp_send_failure_event);398 fd_log_debug( " sctp_peer_error_event : %hhu \n", event.sctp_peer_error_event);399 fd_log_debug( " sctp_shutdown_event : %hhu \n", event.sctp_shutdown_event);400 fd_log_debug( " sctp_partial_delivery_event : %hhu \n", event.sctp_partial_delivery_event);401 fd_log_debug( " sctp_adaptation_layer_event : %hhu \n", event.sctp_adaptation_layer_event);402 // fd_log_debug( " sctp_authentication_event : %hhu \n", event.sctp_authentication_event);394 fd_log_debug( "SCTP_EVENTS : sctp_data_io_event : %hhu", event.sctp_data_io_event); 395 fd_log_debug( " sctp_association_event : %hhu", event.sctp_association_event); 396 fd_log_debug( " sctp_address_event : %hhu", event.sctp_address_event); 397 fd_log_debug( " sctp_send_failure_event : %hhu", event.sctp_send_failure_event); 398 fd_log_debug( " sctp_peer_error_event : %hhu", event.sctp_peer_error_event); 399 fd_log_debug( " sctp_shutdown_event : %hhu", event.sctp_shutdown_event); 400 fd_log_debug( " sctp_partial_delivery_event : %hhu", event.sctp_partial_delivery_event); 401 fd_log_debug( " sctp_adaptation_layer_event : %hhu", event.sctp_adaptation_layer_event); 402 // fd_log_debug( " sctp_authentication_event : %hhu", event.sctp_authentication_event); 403 403 } 404 404 } … … 421 421 return ENOTSUP; 422 422 } 423 fd_log_debug( "Def SCTP_I_WANT_MAPPED_V4_ADDR value : %s \n", v4mapped ? "true" : "false");423 fd_log_debug( "Def SCTP_I_WANT_MAPPED_V4_ADDR value : %s", v4mapped ? "true" : "false"); 424 424 } 425 425 … … 436 436 /* Check new values */ 437 437 CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_I_WANT_MAPPED_V4_ADDR, &v4mapped, &sz) ); 438 fd_log_debug( "New SCTP_I_WANT_MAPPED_V4_ADDR value : %s \n", v4mapped ? "true" : "false");438 fd_log_debug( "New SCTP_I_WANT_MAPPED_V4_ADDR value : %s", v4mapped ? "true" : "false"); 439 439 } 440 440 } else { … … 467 467 return ENOTSUP; 468 468 } 469 fd_log_debug( "Def SCTP_FRAGMENT_INTERLEAVE value : %d \n", interleave);469 fd_log_debug( "Def SCTP_FRAGMENT_INTERLEAVE value : %d", interleave); 470 470 } 471 471 … … 482 482 /* Check new values */ 483 483 CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_FRAGMENT_INTERLEAVE, &interleave, &sz) ); 484 fd_log_debug( "New SCTP_FRAGMENT_INTERLEAVE value : %d \n", interleave);484 fd_log_debug( "New SCTP_FRAGMENT_INTERLEAVE value : %d", interleave); 485 485 } 486 486 } … … 513 513 return ENOTSUP; 514 514 } 515 fd_log_debug( "Def SCTP_EXPLICIT_EOR value : %s \n", bool ? "true" : "false");515 fd_log_debug( "Def SCTP_EXPLICIT_EOR value : %s", bool ? "true" : "false"); 516 516 } 517 517 … … 524 524 /* Check new values */ 525 525 CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_EXPLICIT_EOR, &bool, &sz) ); 526 fd_log_debug( "New SCTP_EXPLICIT_EOR value : %s \n", bool ? "true" : "false");526 fd_log_debug( "New SCTP_EXPLICIT_EOR value : %s", bool ? "true" : "false"); 527 527 } 528 528 } … … 571 571 return ENOTSUP; 572 572 } 573 fd_log_debug( "Def SCTP_AUTO_ASCONF value : %s \n", asconf ? "true" : "false");573 fd_log_debug( "Def SCTP_AUTO_ASCONF value : %s", asconf ? "true" : "false"); 574 574 } 575 575 … … 583 583 /* Check new values */ 584 584 CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_AUTO_ASCONF, &asconf, &sz) ); 585 fd_log_debug( "New SCTP_AUTO_ASCONF value : %s \n", asconf ? "true" : "false");585 fd_log_debug( "New SCTP_AUTO_ASCONF value : %s", asconf ? "true" : "false"); 586 586 } 587 587 } … … 746 746 int i; 747 747 ptr.sa = sar; 748 fd_log_debug("Calling sctp_bindx with the following address array: \n");748 fd_log_debug("Calling sctp_bindx with the following address array:"); 749 749 for (i = 0; i < count; i++) { 750 750 TRACE_sSA(FD_LOG_DEBUG, FULL, " - ", ptr.sa, NI_NUMERICHOST | NI_NUMERICSERV, "" ); … … 774 774 CHECK_SYS( sz = sctp_getladdrs(*sock, 0, &sar) ); 775 775 776 fd_log_debug("SCTP server bound on : \n");776 fd_log_debug("SCTP server bound on :"); 777 777 for (ptr.sa = sar; sz-- > 0; ptr.buf += (ptr.sa->sa_family == AF_INET) ? sizeof(sSA4) : sizeof(sSA6)) { 778 778 TRACE_sSA(FD_LOG_DEBUG, FULL, " - ", ptr.sa, NI_NUMERICHOST | NI_NUMERICSERV, "" ); … … 911 911 char buf[1024]; 912 912 sSA_DUMP_NODE_SERV(buf, sizeof(buf), &status.sstat_primary.spinfo_address, NI_NUMERICHOST | NI_NUMERICSERV ); 913 fd_log_debug( "SCTP_STATUS : sstat_state : %i \n" , status.sstat_state);914 fd_log_debug( " sstat_rwnd : %u \n" , status.sstat_rwnd);915 fd_log_debug( " sstat_unackdata : %hu \n", status.sstat_unackdata);916 fd_log_debug( " sstat_penddata : %hu \n", status.sstat_penddata);917 fd_log_debug( " sstat_instrms : %hu \n", status.sstat_instrms);918 fd_log_debug( " sstat_outstrms : %hu \n", status.sstat_outstrms);919 fd_log_debug( " sstat_fragmentation_point : %u \n" , status.sstat_fragmentation_point);920 fd_log_debug( " sstat_primary.spinfo_address : %s \n" , buf);921 fd_log_debug( " sstat_primary.spinfo_state : %d \n" , status.sstat_primary.spinfo_state);922 fd_log_debug( " sstat_primary.spinfo_cwnd : %u \n" , status.sstat_primary.spinfo_cwnd);923 fd_log_debug( " sstat_primary.spinfo_srtt : %u \n" , status.sstat_primary.spinfo_srtt);924 fd_log_debug( " sstat_primary.spinfo_rto : %u \n" , status.sstat_primary.spinfo_rto);925 fd_log_debug( " sstat_primary.spinfo_mtu : %u \n" , status.sstat_primary.spinfo_mtu);913 fd_log_debug( "SCTP_STATUS : sstat_state : %i" , status.sstat_state); 914 fd_log_debug( " sstat_rwnd : %u" , status.sstat_rwnd); 915 fd_log_debug( " sstat_unackdata : %hu", status.sstat_unackdata); 916 fd_log_debug( " sstat_penddata : %hu", status.sstat_penddata); 917 fd_log_debug( " sstat_instrms : %hu", status.sstat_instrms); 918 fd_log_debug( " sstat_outstrms : %hu", status.sstat_outstrms); 919 fd_log_debug( " sstat_fragmentation_point : %u" , status.sstat_fragmentation_point); 920 fd_log_debug( " sstat_primary.spinfo_address : %s" , buf); 921 fd_log_debug( " sstat_primary.spinfo_state : %d" , status.sstat_primary.spinfo_state); 922 fd_log_debug( " sstat_primary.spinfo_cwnd : %u" , status.sstat_primary.spinfo_cwnd); 923 fd_log_debug( " sstat_primary.spinfo_srtt : %u" , status.sstat_primary.spinfo_srtt); 924 fd_log_debug( " sstat_primary.spinfo_rto : %u" , status.sstat_primary.spinfo_rto); 925 fd_log_debug( " sstat_primary.spinfo_mtu : %u" , status.sstat_primary.spinfo_mtu); 926 926 } 927 927 … … 1219 1219 sndrcv = (struct sctp_sndrcvinfo *) CMSG_DATA(hdr); 1220 1220 if (TRACE_BOOL(SCTP_LEVEL)) { 1221 fd_log_debug( "Anciliary block IPPROTO_SCTP / SCTP_SNDRCV \n");1222 fd_log_debug( " sinfo_stream : %hu \n", sndrcv->sinfo_stream);1223 fd_log_debug( " sinfo_ssn : %hu \n", sndrcv->sinfo_ssn);1224 fd_log_debug( " sinfo_flags : %hu \n", sndrcv->sinfo_flags);1225 /* fd_log_debug( " sinfo_pr_policy : %hu \n", sndrcv->sinfo_pr_policy); */1226 fd_log_debug( " sinfo_ppid : %u \n" , sndrcv->sinfo_ppid);1227 fd_log_debug( " sinfo_context : %u \n" , sndrcv->sinfo_context);1228 /* fd_log_debug( " sinfo_pr_value : %u \n" , sndrcv->sinfo_pr_value); */1229 fd_log_debug( " sinfo_tsn : %u \n" , sndrcv->sinfo_tsn);1230 fd_log_debug( " sinfo_cumtsn : %u \n" , sndrcv->sinfo_cumtsn);1221 fd_log_debug( "Anciliary block IPPROTO_SCTP / SCTP_SNDRCV"); 1222 fd_log_debug( " sinfo_stream : %hu", sndrcv->sinfo_stream); 1223 fd_log_debug( " sinfo_ssn : %hu", sndrcv->sinfo_ssn); 1224 fd_log_debug( " sinfo_flags : %hu", sndrcv->sinfo_flags); 1225 /* fd_log_debug( " sinfo_pr_policy : %hu", sndrcv->sinfo_pr_policy); */ 1226 fd_log_debug( " sinfo_ppid : %u" , sndrcv->sinfo_ppid); 1227 fd_log_debug( " sinfo_context : %u" , sndrcv->sinfo_context); 1228 /* fd_log_debug( " sinfo_pr_value : %u" , sndrcv->sinfo_pr_value); */ 1229 fd_log_debug( " sinfo_tsn : %u" , sndrcv->sinfo_tsn); 1230 fd_log_debug( " sinfo_cumtsn : %u" , sndrcv->sinfo_cumtsn); 1231 1231 } 1232 1232 -
libfdcore/sctps.c
r965 r974 486 486 if (TRACE_BOOL(FULL)) { 487 487 if (resumed) { 488 fd_log_debug("Session was resumed successfully on stream %hu (conn: '%s') \n", ctx->strid, fd_cnx_getid(ctx->parent));488 fd_log_debug("Session was resumed successfully on stream %hu (conn: '%s')", ctx->strid, fd_cnx_getid(ctx->parent)); 489 489 } else { 490 fd_log_debug("Session was NOT resumed on stream %hu (full handshake) (conn: '%s') \n", ctx->strid, fd_cnx_getid(ctx->parent));490 fd_log_debug("Session was NOT resumed on stream %hu (full handshake) (conn: '%s')", ctx->strid, fd_cnx_getid(ctx->parent)); 491 491 } 492 492 } -
libfdcore/server.c
r931 r974 98 98 struct fd_list * li, *cli; 99 99 100 fd_log_debug("Dumping servers list : \n");100 fd_log_debug("Dumping servers list :"); 101 101 for (li = FD_SERVERS.next; li != &FD_SERVERS; li = li->next) { 102 102 struct server * s = (struct server *)li; 103 103 enum s_state st = get_status(s); 104 fd_log_debug(" Serv %p '%s': %s, %s, %s \n",104 fd_log_debug(" Serv %p '%s': %s, %s, %s", 105 105 s, fd_cnx_getid(s->conn), 106 106 IPPROTO_NAME( s->proto ), … … 115 115 struct client * c = (struct client *)cli; 116 116 char bufts[128]; 117 fd_log_debug(" Connected: '%s' (timeout: %s) \n",117 fd_log_debug(" Connected: '%s' (timeout: %s)", 118 118 fd_cnx_getid(c->conn), 119 119 fd_log_time(&c->ts, bufts, sizeof(bufts))); … … 148 148 if (ret != 0) { 149 149 if (TRACE_BOOL(INFO)) { 150 fd_log_debug("TLS handshake failed for client '%s', connection aborted. \n", fd_cnx_getid(c->conn));150 fd_log_debug("TLS handshake failed for client '%s', connection aborted.", fd_cnx_getid(c->conn)); 151 151 } 152 152 goto cleanup; … … 177 177 CHECK_FCT_DO( fd_msg_hdr ( msg, &hdr ), goto fatal_error ); 178 178 CHECK_PARAMS_DO( (hdr->msg_appl == 0) && (hdr->msg_flags & CMD_FLAG_REQUEST) && (hdr->msg_code == CC_CAPABILITIES_EXCHANGE), 179 { fd_log_debug("Connection '%s', expecting CER, received something else, closing... \n", fd_cnx_getid(c->conn)); goto cleanup; } );179 { fd_log_debug("Connection '%s', expecting CER, received something else, closing...", fd_cnx_getid(c->conn)); goto cleanup; } ); 180 180 181 181 /* Finally, pass the information to the peers module which will handle it next */ … … 387 387 CHECK_FCT(fd_cnx_get_local_eps(&fd_g_config->cnf_endpoints)); 388 388 if (FD_IS_LIST_EMPTY(&fd_g_config->cnf_endpoints)) { 389 TRACE_DEBUG(INFO, "Unable to find the address(es) of the local system. \n"389 TRACE_DEBUG(INFO, "Unable to find the address(es) of the local system." 390 390 "Please use \"ListenOn\" parameter in the configuration.\n" 391 391 "This information is required to generate the CER/CEA messages.\n"); … … 394 394 } 395 395 if (TRACE_BOOL(FULL)){ 396 fd_log_debug(" Local server address(es) : \n");396 fd_log_debug(" Local server address(es) :"); 397 397 fd_ep_dump( 5, &fd_g_config->cnf_endpoints ); 398 398 }
Note: See TracChangeset
for help on using the changeset viewer.