Index: contrib/debian/changelog
===================================================================
--- contrib/debian/changelog	(revision 1542)
+++ contrib/debian/changelog	(revision 1398)
@@ -1,125 +1,2 @@
-freediameter (UNRELEASED) UNRELEASED; urgency=low
-
-  * freeDiameter:
-    - Add -g to help
-    - Change -d and -q to control syslog level, as per stdout logging.
-    - Syslog to LOG_DAEMON.
-    - Actually syslog to LOG_DEBUG, now that -d/-q are used.
-    - Add -p pidfile
-    - SCTP client: bind to local endpoints configured with ListenOn so
-      that the SCTP INIT only contains those local endpoint addresses,
-      matching what is advertised in the CER.
-  * Base dictionary: Add rules for Experimental-Result.
-  * All extensions: Hide symbols except for fd_ext_init() and fd_ext_fini().
-  * dbg_dict_dump.fdx: add extension to write the dictionary
-    to the given file or to the log.
-  * dbg_dict_dump_json.fdx: add extension to write the dictionary as JSON
-    to the given file or stdout.
-  * dict_dcca_3gpp.fdx: Update to 3GPP Release 15, adding many standards.
-    This adds 96 TYPEs, 145 ENUMVALs, 791 AVPs, 52 RULEs.
-    There are various breaking changes (documented below).
-  * contrib/dictionary_dcca_3gpp.json: Remove non-3GPP AVPs that are
-    actually from base IETF RFCs:
-      - MIP6-Feature-Vector (124). IETF RFC 5447
-      - Service-Selection (493). IETF RFC 5778
-      - Mobile-Node-Identifier (506). IETF RFC 5779
-      - QoS-Capability (578). IETF RFC 5777.
-  * New API: fd_msg_add_result(): set Result-Code or Experimental-Result.
-  * New API: log level FD_LOG_INFO.
-  * fd_conf_dump(): fix formatting of local endpoints.
-  * fd_msg_search_avp(): support searching avp as well as msg.
-  * Fix compiler warnings.
-  * Add ERRORS_ON_WARNINGS cmake boolean to enable fatal compiler warnings.
-  * New tool: grep_fd_dict_dump: cleanup fd_dict_dump() output in logs.
-  * New tool: csv_to_fd: convert .csv with AVP tables to freeDiameter C or JSON.
-  * New tool: org_to_csv: convert .org files into .csv files.
-
-  * dict_dcca_3gpp.fdx changes per update to 3GPP Release 15 as at 2019-12:
-    - AVP changes:
-      - 3GPP-CG-IPv6-Address (14) renamed to 3GPP-CG-Ipv6-Address (14).
-      - 3GPP-GGSN-IPv6-Address (16) renamed to 3GPP-GGSN-Ipv6-Address (16).
-      - 3GPP-IPv6-DNS-Servers (17) renamed to 3GPP-Ipv6-DNS-Servers (17).
-      - 3GPP-SGSN-IPv6-Address (15) renamed to 3GPP-SGSN-Ipv6-Address (15).
-      - 3GPP2-BSID (9010) flag M MUST.
-      - 3GPP2-BSID (9010) type changed from OctetString to UTF8String.
-      - ADC-Revalidation-Time (2801) Time removed in 3GPP TS 29.212 V12.1.0 (2013-06).
-      - ADC-Rule-Base-Name (1095) flag M MUST.
-      - ADC-Rule-Definition (1094) flag M MUST.
-      - ADC-Rule-Install (1092) flag M MUST.
-      - ADC-Rule-Name (1096) flag M MUST.
-      - ADC-Rule-Remove (1093) flag M MUST.
-      - ADC-Rule-Report (1097) flag M MUST.
-      - Application-Service-Type (2102) type changed from UTF8String to Enumerated.
-      - Application–Session–Id (2103) type changed from UTF8String to Unsigned32.
-      - Call-Barring-Infor-List (1488) renamed to Call-Barring-Info (1488).
-      - External-Identifier (28) OctetString replaced by External-Identifier (3111) UTF8String.
-      - LCS-Requestor-Id (1239) renamed to LCS-Requestor-ID (1239).
-      - LCS-Requestor-Id-String (1240) renamed to LCS-Requestor-ID-String (1240).
-      - MBMS-BMSC-SSM-IPv6-Address (919) renamed to MBMS-BMSC-SSM-Ipv6-Address (919).
-      - MBMS-GGSN-IPv6-Address (917) renamed to MBMS-GGSN-Ipv6-Address (917).
-      - MBMSGW-Address (2307) renamed to MBMS-GW-Address (2307).
-      - Measurement-Period-LTE (1656) code changed to Measurement-Period-LTE (1655).
-      - Measurement-Period-UMTS (1655) code changed to Measurement-Period-UMTS (1656).
-      - MME-LocationInformation (1600) renamed to MME-Location-Information(1600).
-      - PDG-Address (895) Address removed in 3GPP TS 32.299 V12.6.0 (2014-09).
-      - PDG-Charging-Id (896) Unsigned32 removed in 3GPP TS 32.299 V12.6.0 (2014-09).
-      - PDN-Connection-ID (1065) flag M MUST NOT.
-      - PoC-User-Role-info-Units (1254) renamed to PoC-User-Role-Info-Units (1254).
-      - PS-to-CS-Session-Continuity (1099) flag M MUST NOT.
-      - SS-Status (1477) type changed from Grouped to OctetString.
-      - Status (2702) renamed to Status-AS-Code (2702).
-      - WAG-Address (890) Address removed in 3GPP TS 32.299 V12.6.0 (2014-09).
-      - WAG-PLMN-Id (891) OctetString removed in 3GPP TS 32.299 V12.6.0 (2014-09).
-      - WLAN-Information (875) Grouped removed in 3GPP TS 32.299 V12.6.0 (2014-09).
-      - WLAN-Radio-Container (892) Grouped removed in 3GPP TS 32.299 V12.6.0 (2014-09).
-      - WLAN-Session-Id (1246) UTF8String removed in 3GPP TS 32.299 V12.6.0 (2014-09).
-      - WLAN-Technology (893) Unsigned32 removed in 3GPP TS 32.299 V12.6.0 (2014-09).
-      - WLAN-UE-Local-IPAddress (894) Address removed in 3GPP TS 32.299 V12.6.0 (2014-09).
-    - AVP renames:
-      - Rename Call-Barring-Infor-List (1488) to Call-Barring-Info (1488).
-      - Rename LCS-Requestor-Id (1239) to LCS-Requestor-ID (1239).
-      - Rename LCS-Requestor-Id-String (1240) to LCS-Requestor-ID-String (1240).
-      - Rename MBMSGW-Address (2307) to MBMS-GW-Address (2307).
-      - Rename MME-LocationInformation (1600) to MME-Location-Information(1600).
-      - Rename PoC-User-Role-info-Units (1254) to PoC-User-Role-Info-Units (1254).
-      - Rename Status (2702) to Status-AS-Code (2702).
-    - AVP name conflicts:
-      - Time-Window (3818) in 3GPP TS 29.345 V12.1.0 (2014-12) predates
-        Time-Window-29.154 (4204) in 3GPP TS 29.154 V13.1.0 (2016-03).
-    - Add Enumerated(3GPP/Experimental-Result-Code). 145 values.
-    - Update standards:
-      - 3GPP TS 29.061 V15.5.0 (2018-12). 15 AVPs.
-      - 3GPP TS 29.173 V15.0.0 (2018-06). 1 AVP.
-      - 3GPP TS 29.212 V15.9.0 (2019-12). 46 AVPs.
-      - 3GPP TS 29.214 V15.7.0 (2019-09). 27 AVPs.
-      - 3GPP TS 29.229 V15.2.0 (2019-09). 8 AVPs.
-      - 3GPP TS 29.272 V15.10.0 (2019-12). 44 AVPs.
-      - 3GPP TS 29.329 V15.2.0 (2019-09). 5 AVPs.
-      - 3GPP TS 32.299 V15.7.0 (2019-06). 154 AVPs.
-    - Add standards:
-      - 3GPP TS 29.109 V15.0.0 (2017-06). 21 AVPs.
-      - 3GPP TS 29.128 V15.6.0 (2019-09). 25 AVPs.
-      - 3GPP TS 29.153 V15.1.0 (2019-09). 2 AVPs.
-      - 3GPP TS 29.154 V15.3.0 (2019-09). 16 AVPs.
-      - 3GPP TS 29.172 V15.2.0 (2019-12). 66 AVPs.
-      - 3GPP TS 29.209 V6.8.0 (2011-09). 2 AVPs.
-      - 3GPP TS 29.215 V15.2.0 (2019-09). 9 AVPs.
-      - 3GPP TS 29.217 V15.1.0 (2019-09). 14 AVPs.
-      - 3GPP TS 29.219 V15.3.0 (2019-09). 7 AVPs.
-      - 3GPP TS 29.234 V11.2.0 (2013-06). 19 AVPs.
-      - 3GPP TS 29.273 V15.4.0 (2019-09). 40 AVPs.
-      - 3GPP TS 29.283 V15.1.0 (2019-09). 16 AVPs.
-      - 3GPP TS 29.336 V15.7.0 (2019-09). 79 AVPs.
-      - 3GPP TS 29.337 V15.0.0 (2018-06). 4 AVPs.
-      - 3GPP TS 29.338 V15.1.0 (2018-12). 34 AVPs.
-      - 3GPP TS 29.343 V15.1.0 (2019-09). 13 AVPs.
-      - 3GPP TS 29.344 V15.1.0 (2019-09). 7 AVPs.
-      - 3GPP TS 29.345 V15.1.0 (2019-09). 68 AVPs.
-      - 3GPP TS 29.368 V15.1.0 (2019-09). 12 AVPs.
-      - 3GPP TS 29.388 V15.1.0 (2019-09). 3 AVPs.
-      - 3GPP TS 29.389 V15.1.0 (2019-09). 3 AVPs.
-      - 3GPP TS 29.468 V15.8.0 (2019-12). 33 AVPs.
-      - 3GPP TS 29.561 V16.3.0 (2020-03). 9 AVPs.
-
 freediameter (1.4.0) RELEASED; urgency=low
 
Index: include/freeDiameter/libfdcore.h
===================================================================
--- include/freeDiameter/libfdcore.h	(revision 1540)
+++ include/freeDiameter/libfdcore.h	(revision 1425)
@@ -152,5 +152,4 @@
 		unsigned pr_tcp	: 1;	/* prefer TCP over SCTP */
 		unsigned tls_alg: 1;	/* TLS algorithm for initiated cnx. 0: separate port. 1: inband-security (old) */
-		unsigned no_bind: 1;	/* disable client bind to cnf_endpoints if non configured (bind all) */
 	} 		 cnf_flags;
 	
Index: libfdcore/cnxctx.c
===================================================================
--- libfdcore/cnxctx.c	(revision 1540)
+++ libfdcore/cnxctx.c	(revision 1419)
@@ -331,7 +331,6 @@
 }
 
-/* Same for SCTP, accepts a list of remote addresses to connect to (see sctp_connectx for how they are used).
- * If src_list is not NULL and not empty, list of local addresses to connect from via sctp_bindx(). */
-struct cnxctx * fd_cnx_cli_connect_sctp(int no_ip6, uint16_t port, struct fd_list * list, struct fd_list * src_list)
+/* Same for SCTP, accepts a list of remote addresses to connect to (see sctp_connectx for how they are used) */
+struct cnxctx * fd_cnx_cli_connect_sctp(int no_ip6, uint16_t port, struct fd_list * list)
 {
 #ifdef DISABLE_SCTP
@@ -346,30 +345,13 @@
 	sSS primary;
 
-	TRACE_ENTRY("%p %p", list, src_list);
+	TRACE_ENTRY("%p", list);
 	CHECK_PARAMS_DO( list && !FD_IS_LIST_EMPTY(list), return NULL );
 
-	/* Log SCTP association source and destination endpoints */
+	fd_sa_sdump_numeric(sa_buf, &((struct fd_endpoint *)(list->next))->sa);
+
+	LOG_D("Connecting to SCTP %s:%hu...", sa_buf, port);
+
 	{
-		char * buf = NULL;
-		size_t len = 0, offset = 0;
-		CHECK_MALLOC_DO( fd_dump_extend( &buf, &len, &offset, "Connecting SCTP endpoints"), );
-		CHECK_MALLOC_DO( fd_dump_extend( &buf, &len, &offset, " source: "), );
-		if (src_list && !FD_IS_LIST_EMPTY(src_list)) {
-			CHECK_MALLOC_DO( fd_ep_dump( &buf, &len, &offset, 0, 0, src_list ), );
-		} else {
-			CHECK_MALLOC_DO( fd_dump_extend( &buf, &len, &offset, "(ANY)"), );
-		}
-		CHECK_MALLOC_DO( fd_dump_extend( &buf, &len, &offset, ", destination: "), );
-		CHECK_MALLOC_DO( fd_ep_dump( &buf, &len, &offset, 0, 0, list ), );
-		LOG_D("%s", buf ?: "Error determining SCTP endpoints");
-		free(buf);
-	}
-
-	fd_sa_sdump_numeric(sa_buf, &((struct fd_endpoint *)(list->next))->sa);
-
-	LOG_D("Connecting to SCTP %s:%hu...", sa_buf, port);
-
-	{
-		int ret = fd_sctp_client( &sock, no_ip6, port, list, src_list );
+		int ret = fd_sctp_client( &sock, no_ip6, port, list );
 		if (ret != 0) {
 			LOG_D("SCTP connection to [%s,...] failed: %s", sa_buf, strerror(ret));
Index: libfdcore/cnxctx.h
===================================================================
--- libfdcore/cnxctx.h	(revision 1540)
+++ libfdcore/cnxctx.h	(revision 1421)
@@ -118,5 +118,5 @@
 int fd_sctp_create_bind_server( int * sock, int family, struct fd_list * list, uint16_t port );
 int fd_sctp_listen( int sock );
-int fd_sctp_client( int *sock, int no_ip6, uint16_t port, struct fd_list * list, struct fd_list * src_list );
+int fd_sctp_client( int *sock, int no_ip6, uint16_t port, struct fd_list * list );
 int fd_sctp_get_local_ep(int sock,  struct fd_list * list);
 int fd_sctp_get_remote_ep(int sock, struct fd_list * list);
Index: libfdcore/config.c
===================================================================
--- libfdcore/config.c	(revision 1540)
+++ libfdcore/config.c	(revision 1415)
@@ -148,5 +148,4 @@
 	CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "          - Pref. proto .. : %s\n", fd_g_config->cnf_flags.pr_tcp ? "TCP" : "SCTP"), return NULL);
 	CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "          - TLS method ... : %s\n", fd_g_config->cnf_flags.tls_alg ? "INBAND" : "Separate port"), return NULL);
-	CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "          - Client bind .. : %s\n", fd_g_config->cnf_flags.no_bind ? "DISABLED" : "Enabled"), return NULL);
 	
 	CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "  TLS :   - Certificate .. : %s\n", fd_g_config->cnf_sec_data.cert_file ?: "(NONE)"), return NULL);
@@ -353,6 +352,5 @@
 	
 	/* Validate local endpoints */
-	fd_g_config->cnf_flags.no_bind = FD_IS_LIST_EMPTY(&fd_g_config->cnf_endpoints);
-	if ((!fd_g_config->cnf_flags.no_bind) && (fd_g_config->cnf_flags.no_ip4 || fd_g_config->cnf_flags.no_ip6)) {
+	if ((!FD_IS_LIST_EMPTY(&fd_g_config->cnf_endpoints)) && (fd_g_config->cnf_flags.no_ip4 || fd_g_config->cnf_flags.no_ip6)) {
 		struct fd_list * li;
 		for ( li = fd_g_config->cnf_endpoints.next; li != &fd_g_config->cnf_endpoints; li = li->next) {
Index: libfdcore/fdcore-internal.h
===================================================================
--- libfdcore/fdcore-internal.h	(revision 1540)
+++ libfdcore/fdcore-internal.h	(revision 1397)
@@ -343,5 +343,5 @@
 struct cnxctx * fd_cnx_serv_accept(struct cnxctx * serv);
 struct cnxctx * fd_cnx_cli_connect_tcp(sSA * sa, socklen_t addrlen);
-struct cnxctx * fd_cnx_cli_connect_sctp(int no_ip6, uint16_t port, struct fd_list * list, struct fd_list * src_list);
+struct cnxctx * fd_cnx_cli_connect_sctp(int no_ip6, uint16_t port, struct fd_list * list);
 int             fd_cnx_start_clear(struct cnxctx * conn, int loop);
 void		fd_cnx_sethostname(struct cnxctx * conn, DiamId_t hn);
Index: libfdcore/p_cnx.c
===================================================================
--- libfdcore/p_cnx.c	(revision 1540)
+++ libfdcore/p_cnx.c	(revision 1203)
@@ -262,5 +262,4 @@
 		switch (nc->proto) {
 			case IPPROTO_TCP:
-/* TODO: use no_bind and first of cnf_endpoints of nc->ss.sa_family ? */
 				cnx = fd_cnx_cli_connect_tcp((sSA *)&nc->ss, sSAlen(&nc->ss));
 				break;
@@ -268,6 +267,5 @@
 			case IPPROTO_SCTP:
 				cnx = fd_cnx_cli_connect_sctp((peer->p_hdr.info.config.pic_flags.pro3 == PI_P3_IP) ? 1 : fd_g_config->cnf_flags.no_ip6, 
-							nc->port, &peer->p_hdr.info.pi_endpoints,
-							fd_g_config->cnf_flags.no_bind ? NULL : &fd_g_config->cnf_endpoints);
+							nc->port, &peer->p_hdr.info.pi_endpoints);
 				break;
 #endif /* DISABLE_SCTP */
Index: libfdcore/sctp.c
===================================================================
--- libfdcore/sctp.c	(revision 1541)
+++ libfdcore/sctp.c	(revision 1543)
@@ -59,32 +59,4 @@
 #endif /* USE_DEFAULT_SCTP_RTX_PARAMS */
 
-
-DECLARE_FD_DUMP_PROTOTYPE(fd_sa_dump_array, sSA * saddrs, int saddrs_count)
-{
-	union {
-		sSA	*sa;
-		uint8_t *buf;
-	} ptr;
-	int i;
-	int salen;
-
-	FD_DUMP_HANDLE_OFFSET();
-
-	ptr.sa = saddrs;
-	for (i = 0; i < saddrs_count; i++) {
-		salen = sSAlen(ptr.sa);
-		if (salen == 0) {
-			LOG_E("fd_sa_dump_array: Unknown sockaddr family");
-			break;
-		}
-		if (i > 0) {
-			CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " "), return NULL);
-		}
-		CHECK_MALLOC_DO( fd_sa_dump( FD_DUMP_STD_PARAMS, ptr.sa, NI_NUMERICHOST | NI_NUMERICSERV), return NULL);
-		ptr.buf += salen;
-	}
-	return *buf;
-}
-
 /* Pre-binding socket options -- # streams read in config */
 static int fd_setsockopt_prebind(int sk)
@@ -111,5 +83,5 @@
 			sz = sizeof(rtoinfo);
 			/* Read socket defaults */
-			CHECK_SYS(  getsockopt(sk, IPPROTO_SCTP, SCTP_RTOINFO, &rtoinfo, &sz)  );
+			CHECK_SYS(  sctp_opt_info(sk, 0, SCTP_RTOINFO, &rtoinfo, &sz)  );
 			if (sz != sizeof(rtoinfo))
 			{
@@ -131,5 +103,5 @@
 		if (TRACE_BOOL(ANNOYING)) {
 			/* Check new values */
-			CHECK_SYS(  getsockopt(sk, IPPROTO_SCTP, SCTP_RTOINFO, &rtoinfo, &sz)  );
+			CHECK_SYS(  sctp_opt_info(sk, 0, SCTP_RTOINFO, &rtoinfo, &sz)  );
 			fd_log_debug( "New SCTP_RTOINFO : srto_initial : %u", rtoinfo.srto_initial);
 			fd_log_debug( "                   srto_max     : %u", rtoinfo.srto_max);
@@ -150,5 +122,5 @@
 			sz = sizeof(assoc);
 			/* Read socket defaults */
-			CHECK_SYS(  getsockopt(sk, IPPROTO_SCTP, SCTP_ASSOCINFO, &assoc, &sz)  );
+			CHECK_SYS(  sctp_opt_info(sk, 0, SCTP_ASSOCINFO, &assoc, &sz)  );
 			if (sz != sizeof(assoc))
 			{
@@ -171,5 +143,5 @@
 		if (TRACE_BOOL(ANNOYING)) {
 			/* Check new values */
-			CHECK_SYS(  getsockopt(sk, IPPROTO_SCTP, SCTP_ASSOCINFO, &assoc, &sz)  );
+			CHECK_SYS(  sctp_opt_info(sk, 0, SCTP_ASSOCINFO, &assoc, &sz)  );
 			fd_log_debug( "New SCTP_ASSOCINFO : sasoc_asocmaxrxt               : %hu", assoc.sasoc_asocmaxrxt);
 			fd_log_debug( "                     sasoc_number_peer_destinations : %hu", assoc.sasoc_number_peer_destinations);
@@ -347,5 +319,5 @@
 
 			/* Read socket defaults */
-			CHECK_SYS(  getsockopt(sk, IPPROTO_SCTP, SCTP_PEER_ADDR_PARAMS, &parms, &sz)  );
+			CHECK_SYS(  sctp_opt_info(sk, 0, SCTP_PEER_ADDR_PARAMS, &parms, &sz)  );
 			if (sz != sizeof(parms))
 			{
@@ -376,5 +348,5 @@
 		if (TRACE_BOOL(ANNOYING)) {
 			/* Check new values */
-			CHECK_SYS(  getsockopt(sk, IPPROTO_SCTP, SCTP_PEER_ADDR_PARAMS, &parms, &sz)  );
+			CHECK_SYS(  sctp_opt_info(sk, 0, SCTP_PEER_ADDR_PARAMS, &parms, &sz)  );
 			fd_log_debug( "New SCTP_PEER_ADDR_PARAMS : spp_hbinterval    : %u",  parms.spp_hbinterval);
 			fd_log_debug( "                            spp_pathmaxrxt    : %hu", parms.spp_pathmaxrxt);
@@ -843,14 +815,19 @@
 			goto redo;
 		}
-
-		/* Debug: show bound addresses */
-		{
-			char * buf = NULL;
-			size_t len = 0;
-			CHECK_MALLOC_DO( fd_sa_dump_array( &buf, &len, 0, sar, count), );
-			LOG_D("SCTP server binding local addresses: %s", buf);
-			free(buf);
-		}
-
+		
+		#if 0
+			union {
+				sSA	*sa;
+				uint8_t *buf;
+			} ptr;
+			int i;
+			ptr.sa = sar;
+			fd_log_debug("Calling sctp_bindx with the following address array:");
+			for (i = 0; i < count; i++) {
+				TRACE_sSA(FD_LOG_DEBUG, FULL, "    - ", ptr.sa, NI_NUMERICHOST | NI_NUMERICSERV, "" );
+				ptr.buf += (ptr.sa->sa_family == AF_INET) ? sizeof(sSA4) : sizeof(sSA6) ;
+			}
+		#endif
+		
 		/* Bind to this array */
 		CHECK_SYS(  sctp_bindx(*sock, sar, count, SCTP_BINDX_ADD_ADDR)  );
@@ -864,17 +841,20 @@
 	
 	/* Debug: show all local listening addresses */
-	{
-		sSA *sar = NULL;
-		int sz = 0;
-		char * buf = NULL;
-		size_t len = 0;
-
+	#if 0
+		sSA *sar;
+		union {
+			sSA	*sa;
+			uint8_t *buf;
+		} ptr;
+		int sz;
+		
 		CHECK_SYS(  sz = sctp_getladdrs(*sock, 0, &sar)  );
-
-		CHECK_MALLOC_DO( fd_sa_dump_array( &buf, &len, 0, sar, sz), );
-		LOG_D("SCTP server locally bound addresses: %s", buf);
+		
+		fd_log_debug("SCTP server bound on :");
+		for (ptr.sa = sar; sz-- > 0; ptr.buf += (ptr.sa->sa_family == AF_INET) ? sizeof(sSA4) : sizeof(sSA6)) {
+			TRACE_sSA(FD_LOG_DEBUG, FULL, "    - ", ptr.sa, NI_NUMERICHOST | NI_NUMERICSERV, "" );
+		}
 		sctp_freeladdrs(sar);
-		free(buf);
-	}
+	#endif
 
 	return 0;
@@ -890,5 +870,5 @@
 
 /* Create a client socket and connect to remote server */
-int fd_sctp_client( int *sock, int no_ip6, uint16_t port, struct fd_list * list, struct fd_list * src_list )
+int fd_sctp_client( int *sock, int no_ip6, uint16_t port, struct fd_list * list )
 {
 	int family;
@@ -900,11 +880,9 @@
 	int count = 0;
 	int ret;
-	int bind_default = 1;	/* enable ASCONF in postbind */
 	
 	sar.buf = NULL;
 	
-	TRACE_ENTRY("%p %i %hu %p %p", sock, no_ip6, port, list, src_list);
+	TRACE_ENTRY("%p %i %hu %p", sock, no_ip6, port, list);
 	CHECK_PARAMS( sock && list && (!FD_IS_LIST_EMPTY(list)) );
-	CHECK_PARAMS( !src_list || (src_list && (!FD_IS_LIST_EMPTY(src_list))) );
 	
 	if (no_ip6) {
@@ -922,31 +900,5 @@
 	/* Set the socket options */
 	CHECK_FCT_DO( ret = fd_setsockopt_prebind(*sock), goto out );
-
-	/* Bind to explicit source addresses if requested */
-	if (src_list && !FD_IS_LIST_EMPTY(src_list)) {
-		sSA * bindsar = NULL; /* array of addresses */
-		size_t sz = 0; /* size of the array */
-		int sarcount = 0; /* number of sock addr in the array */
-
-		/* Create the array of configured addresses */
-		CHECK_FCT_DO( ret = add_addresses_from_list_mask((void *)&bindsar, &sz, &sarcount, family, 0, src_list, EP_FL_CONF, EP_FL_CONF), goto out );
-
-		if (sarcount) {
-			char * buf = NULL;
-			size_t len = 0;
-			CHECK_MALLOC_DO( fd_sa_dump_array( &buf, &len, 0, bindsar, sarcount), goto out );
-			LOG_A("SCTP client binding local addresses: %s", buf);
-			free(buf);
-
-			CHECK_SYS_DO( ret = sctp_bindx(*sock, bindsar, sarcount, SCTP_BINDX_ADD_ADDR), goto out );
-		}
-
-		/* Disable ASCONF option in postbind */
-		bind_default = 0;
-
-		/* We don't need bindsar anymore */
-		free(bindsar);
-	}
-
+	
 	/* Create the array of addresses, add first the configured addresses, then the discovered, then the other ones */
 	CHECK_FCT_DO( ret = add_addresses_from_list_mask(&sar.buf, &size, &count, family, htons(port), list, EP_FL_CONF,              EP_FL_CONF	), goto out );
@@ -955,12 +907,22 @@
 	
 	/* Try connecting */
-	{
-		char * buf = NULL;
-		size_t len = 0;
-		CHECK_MALLOC_DO( fd_sa_dump_array( &buf, &len, 0, sar.sa, count), goto out );
-		LOG_A("SCTP client connecting to addresses: %s", buf);
-		free(buf);
-	}
-
+	LOG_A("Attempting SCTP connection (%d addresses attempted) ", count);
+		
+#if 0
+		/* Dump the SAs */
+		union {
+			uint8_t *buf;
+			sSA	*sa;
+			sSA4	*sin;
+			sSA6	*sin6;
+		} ptr;
+		int i;
+		ptr.buf = sar.buf;
+		for (i=0; i< count; i++) {
+			TRACE_sSA(FD_LOG_DEBUG, FULL, "  - ", ptr.sa, NI_NUMERICHOST | NI_NUMERICSERV, "" );
+			ptr.buf += (ptr.sa->sa_family == AF_INET) ? sizeof(sSA4) : sizeof(sSA6);
+		}
+#endif
+	
 	/* Bug in some Linux kernel, the sctp_connectx is not a cancellation point. To avoid blocking freeDiameter, we allow async cancel here */
 	pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
@@ -983,5 +945,5 @@
 	
 	/* Set the remaining sockopts */
-	CHECK_FCT_DO( ret = fd_setsockopt_postbind(*sock, bind_default),
+	CHECK_FCT_DO( ret = fd_setsockopt_postbind(*sock, 1), 
 		{ 
 			CHECK_SYS_DO( shutdown(*sock, SHUT_RDWR), /* continue */ );
@@ -1021,5 +983,5 @@
 #if 0
 		char sa_buf[sSA_DUMP_STRLEN];
-		fd_sa_sdump_numeric(sa_buf, (sSA *)&status.sstat_primary.spinfo_address);
+		fd_sa_sdump_numeric(sa_buf, &status.sstat_primary.spinfo_address);
 		fd_log_debug( "SCTP_STATUS : sstat_state                  : %i" , status.sstat_state);
 		fd_log_debug( "              sstat_rwnd  	          : %u" , status.sstat_rwnd);
@@ -1257,5 +1219,4 @@
 	if (mhdr.msg_flags & MSG_NOTIFICATION) {
 		union sctp_notification * notif = (union sctp_notification *) data;
-		char sa_buf[sSA_DUMP_STRLEN];
 		
 		TRACE_DEBUG(FULL, "Received %zdb data of notification on socket %d", datasize, conn->cc_socket);
@@ -1275,6 +1236,5 @@
 			case SCTP_PEER_ADDR_CHANGE:
 				TRACE_DEBUG(FULL, "Received SCTP_PEER_ADDR_CHANGE notification");
-				fd_sa_sdump_numeric(sa_buf, (sSA *)&(notif->sn_paddr_change.spc_aaddr));
-				TRACE_DEBUG(ANNOYING, "    intf_change : %s", sa_buf);
+				/* TRACE_sSA(FD_LOG_DEBUG, ANNOYING, "    intf_change : ", &(notif->sn_paddr_change.spc_aaddr), NI_NUMERICHOST | NI_NUMERICSERV, "" ); */
 				TRACE_DEBUG(ANNOYING, "          state : %d", notif->sn_paddr_change.spc_state);
 				TRACE_DEBUG(ANNOYING, "          error : %d", notif->sn_paddr_change.spc_error);
Index: libfdproto/fifo.c
===================================================================
--- libfdproto/fifo.c	(revision 1539)
+++ libfdproto/fifo.c	(revision 1405)
@@ -171,5 +171,5 @@
 {
 	struct fifo * q;
-#ifndef NDEBUG
+#ifdef DEBUG
 	int loops = 0;
 #endif
@@ -228,5 +228,5 @@
 int fd_fifo_move ( struct fifo * old, struct fifo * new, struct fifo ** loc_update )
 {
-#ifndef NDEBUG
+#ifdef DEBUG
 	int loops = 0;
 #endif
@@ -421,5 +421,5 @@
 			queue->thrs_push-- ;
 
-#ifdef NDEBUG
+#ifndef DEBUG
 			(void)ret;
 #endif
Index: libfdproto/messages.c
===================================================================
--- libfdproto/messages.c	(revision 1539)
+++ libfdproto/messages.c	(revision 1442)
@@ -2285,5 +2285,5 @@
 	if (msg->msg_model != NULL) {
 		/* Check if this model is still valid for the message data */
-#ifndef NDEBUG
+#ifdef DEBUG
 		enum dict_object_type 	 dicttype;
 #endif
Index: tests/testcnx.c
===================================================================
--- tests/testcnx.c	(revision 1540)
+++ tests/testcnx.c	(revision 1399)
@@ -675,5 +675,5 @@
 		case IPPROTO_SCTP:
 			{
-				cnx = fd_cnx_cli_connect_sctp(0, TEST_PORT, &eps, NULL);
+				cnx = fd_cnx_cli_connect_sctp(0, TEST_PORT, &eps);
 				CHECK( 1, (cnx ? 1 : 0) ^ cf->expect_failure );
 			}
Index: tests/testsctp.c
===================================================================
--- tests/testsctp.c	(revision 1540)
+++ tests/testsctp.c	(revision 1235)
@@ -99,5 +99,5 @@
 	
 	/* Now, create the client socket */
-	CHECK( 0, fd_sctp_client( &cli.cc_socket, 0, TEST_PORT, &eps, NULL ));
+	CHECK( 0, fd_sctp_client( &cli.cc_socket, 0, TEST_PORT, &eps ));
 	
 	/* Accept this connection */
